Add tag_multiple icon
This commit is contained in:
parent
79ec9b14b1
commit
dedddd7f8d
@ -694,6 +694,7 @@ class SidebarTreeView(QTreeView):
|
|||||||
|
|
||||||
def _tag_tree(self, root: SidebarItem) -> None:
|
def _tag_tree(self, root: SidebarItem) -> None:
|
||||||
icon = ":/icons/tag-outline.svg"
|
icon = ":/icons/tag-outline.svg"
|
||||||
|
icon_multiple = ":/icons/tag-multiple-outline.svg"
|
||||||
icon_off = ":/icons/tag-off-outline.svg"
|
icon_off = ":/icons/tag-off-outline.svg"
|
||||||
|
|
||||||
def render(
|
def render(
|
||||||
@ -708,7 +709,7 @@ class SidebarTreeView(QTreeView):
|
|||||||
for node in nodes:
|
for node in nodes:
|
||||||
item = SidebarItem(
|
item = SidebarItem(
|
||||||
name=node.name,
|
name=node.name,
|
||||||
icon=icon,
|
icon=icon_multiple if node.children else icon,
|
||||||
search_node=SearchNode(tag=head + node.name),
|
search_node=SearchNode(tag=head + node.name),
|
||||||
on_expanded=toggle_expand(node),
|
on_expanded=toggle_expand(node),
|
||||||
expanded=not node.collapsed,
|
expanded=not node.collapsed,
|
||||||
@ -723,7 +724,7 @@ class SidebarTreeView(QTreeView):
|
|||||||
root = self._section_root(
|
root = self._section_root(
|
||||||
root=root,
|
root=root,
|
||||||
name=tr.browsing_sidebar_tags(),
|
name=tr.browsing_sidebar_tags(),
|
||||||
icon=icon,
|
icon=icon_multiple,
|
||||||
collapse_key=Config.Bool.COLLAPSE_TAGS,
|
collapse_key=Config.Bool.COLLAPSE_TAGS,
|
||||||
type=SidebarItemType.TAG_ROOT,
|
type=SidebarItemType.TAG_ROOT,
|
||||||
)
|
)
|
||||||
@ -795,10 +796,15 @@ class SidebarTreeView(QTreeView):
|
|||||||
|
|
||||||
def _notetype_tree(self, root: SidebarItem) -> None:
|
def _notetype_tree(self, root: SidebarItem) -> None:
|
||||||
icon = ":/icons/notetype.svg"
|
icon = ":/icons/notetype.svg"
|
||||||
|
notetype_multiple_icon = icon
|
||||||
|
notetype_icon = icon
|
||||||
|
template_icon = icon
|
||||||
|
|
||||||
|
|
||||||
root = self._section_root(
|
root = self._section_root(
|
||||||
root=root,
|
root=root,
|
||||||
name=tr.browsing_sidebar_notetypes(),
|
name=tr.browsing_sidebar_notetypes(),
|
||||||
icon=icon,
|
icon=notetype_multiple_icon,
|
||||||
collapse_key=Config.Bool.COLLAPSE_NOTETYPES,
|
collapse_key=Config.Bool.COLLAPSE_NOTETYPES,
|
||||||
type=SidebarItemType.NOTETYPE_ROOT,
|
type=SidebarItemType.NOTETYPE_ROOT,
|
||||||
)
|
)
|
||||||
@ -807,7 +813,7 @@ class SidebarTreeView(QTreeView):
|
|||||||
for nt in sorted(self.col.models.all(), key=lambda nt: nt["name"].lower()):
|
for nt in sorted(self.col.models.all(), key=lambda nt: nt["name"].lower()):
|
||||||
item = SidebarItem(
|
item = SidebarItem(
|
||||||
nt["name"],
|
nt["name"],
|
||||||
icon,
|
notetype_icon,
|
||||||
search_node=SearchNode(note=nt["name"]),
|
search_node=SearchNode(note=nt["name"]),
|
||||||
item_type=SidebarItemType.NOTETYPE,
|
item_type=SidebarItemType.NOTETYPE,
|
||||||
id=nt["id"],
|
id=nt["id"],
|
||||||
@ -816,7 +822,7 @@ class SidebarTreeView(QTreeView):
|
|||||||
for c, tmpl in enumerate(nt["tmpls"]):
|
for c, tmpl in enumerate(nt["tmpls"]):
|
||||||
child = SidebarItem(
|
child = SidebarItem(
|
||||||
tmpl["name"],
|
tmpl["name"],
|
||||||
icon,
|
template_icon,
|
||||||
search_node=self.col.group_searches(
|
search_node=self.col.group_searches(
|
||||||
SearchNode(note=nt["name"]), SearchNode(template=c)
|
SearchNode(note=nt["name"]), SearchNode(template=c)
|
||||||
),
|
),
|
||||||
|
@ -1,15 +1,48 @@
|
|||||||
load("//ts:vendor.bzl", "copy_mdi_icons")
|
load("//ts:vendor.bzl", "copy_mdi_icons", "copy_bootstrap_icons")
|
||||||
|
|
||||||
copy_mdi_icons(
|
copy_mdi_icons(
|
||||||
name = "mdi-icons",
|
name = "mdi-icons",
|
||||||
icons = [
|
icons = [
|
||||||
|
"bookmark-multiple-outline.svg",
|
||||||
|
"bookmark-outline.svg",
|
||||||
|
|
||||||
|
"flag-variant.svg",
|
||||||
|
"flag-variant-outline.svg",
|
||||||
|
|
||||||
|
# state
|
||||||
|
"circle.svg",
|
||||||
|
"circle-outline.svg",
|
||||||
|
|
||||||
|
# decks
|
||||||
|
"book-multiple-outline.svg",
|
||||||
|
"book-outline.svg",
|
||||||
|
"book-clock-outline.svg",
|
||||||
|
|
||||||
|
# notetypes
|
||||||
|
"newspaper-variant-outline.svg",
|
||||||
|
"newspaper-variant-multiple-outline.svg",
|
||||||
|
# cards
|
||||||
|
"card-bulleted-outline.svg",
|
||||||
|
# fields
|
||||||
|
"form-textbox.svg",
|
||||||
|
|
||||||
|
# tags
|
||||||
"tag-outline.svg",
|
"tag-outline.svg",
|
||||||
|
"tag-multiple-outline.svg",
|
||||||
"tag-off-outline.svg",
|
"tag-off-outline.svg",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
copy_bootstrap_icons(
|
||||||
|
name = "bootstrap-icons",
|
||||||
|
icons = [
|
||||||
|
"clock.svg",
|
||||||
|
"clock-history.svg",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
filegroup(
|
filegroup(
|
||||||
name = "icons",
|
name = "icons",
|
||||||
srcs = ["mdi-icons"] + glob(["*.svg", "*.png"]),
|
srcs = ["mdi-icons", "bootstrap-icons"] + glob(["*.svg", "*.png"]),
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user