Add new icons for decks
This commit is contained in:
parent
dedddd7f8d
commit
da69a5e352
@ -742,7 +742,10 @@ class SidebarTreeView(QTreeView):
|
||||
###########################
|
||||
|
||||
def _deck_tree(self, root: SidebarItem) -> None:
|
||||
icon = ":/icons/deck.svg"
|
||||
icon = ":/icons/book-outline.svg"
|
||||
icon_multiple = ":/icons/book-multiple-outline.svg"
|
||||
icon_current = ":/icons/book-clock-outline.svg"
|
||||
icon_filtered = ":/icons/book-cog-outline.svg"
|
||||
|
||||
def render(
|
||||
root: SidebarItem, nodes: Iterable[DeckTreeNode], head: str = ""
|
||||
@ -760,7 +763,11 @@ class SidebarTreeView(QTreeView):
|
||||
for node in nodes:
|
||||
item = SidebarItem(
|
||||
name=node.name,
|
||||
icon=icon,
|
||||
icon=icon_filtered
|
||||
if node.filtered
|
||||
else icon_multiple
|
||||
if node.children
|
||||
else icon,
|
||||
search_node=SearchNode(deck=head + node.name),
|
||||
on_expanded=toggle_expand(node),
|
||||
expanded=not node.collapsed,
|
||||
@ -776,14 +783,14 @@ class SidebarTreeView(QTreeView):
|
||||
root = self._section_root(
|
||||
root=root,
|
||||
name=tr.browsing_sidebar_decks(),
|
||||
icon=icon,
|
||||
icon=icon_multiple,
|
||||
collapse_key=Config.Bool.COLLAPSE_DECKS,
|
||||
type=SidebarItemType.DECK_ROOT,
|
||||
)
|
||||
root.search_node = SearchNode(deck="_*")
|
||||
current = root.add_simple(
|
||||
name=tr.browsing_current_deck(),
|
||||
icon=icon,
|
||||
icon=icon_current,
|
||||
type=SidebarItemType.DECK_CURRENT,
|
||||
search_node=SearchNode(deck="current"),
|
||||
)
|
||||
@ -800,7 +807,6 @@ class SidebarTreeView(QTreeView):
|
||||
notetype_icon = icon
|
||||
template_icon = icon
|
||||
|
||||
|
||||
root = self._section_root(
|
||||
root=root,
|
||||
name=tr.browsing_sidebar_notetypes(),
|
||||
|
@ -14,9 +14,10 @@ copy_mdi_icons(
|
||||
"circle-outline.svg",
|
||||
|
||||
# decks
|
||||
"book-multiple-outline.svg",
|
||||
"book-outline.svg",
|
||||
"book-multiple-outline.svg",
|
||||
"book-clock-outline.svg",
|
||||
"book-cog-outline.svg",
|
||||
|
||||
# notetypes
|
||||
"newspaper-variant-outline.svg",
|
||||
|
Loading…
Reference in New Issue
Block a user