mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
Remove multiple icons, new notetype/cardtype icons
This commit is contained in:
parent
fe7057b3f2
commit
bcfbd2f680
2 changed files with 13 additions and 25 deletions
|
@ -522,14 +522,13 @@ class SidebarTreeView(QTreeView):
|
||||||
###########################
|
###########################
|
||||||
|
|
||||||
def _saved_searches_tree(self, root: SidebarItem) -> None:
|
def _saved_searches_tree(self, root: SidebarItem) -> None:
|
||||||
icon = ":/icons/bookmark-outline.svg"
|
icon = ":/icons/heart-outline.svg"
|
||||||
icon_multiple = ":/icons/bookmark-multiple-outline.svg"
|
|
||||||
saved = self._get_saved_searches()
|
saved = self._get_saved_searches()
|
||||||
|
|
||||||
root = self._section_root(
|
root = self._section_root(
|
||||||
root=root,
|
root=root,
|
||||||
name=tr.browsing_sidebar_saved_searches(),
|
name=tr.browsing_sidebar_saved_searches(),
|
||||||
icon=icon_multiple,
|
icon=icon,
|
||||||
collapse_key=Config.Bool.COLLAPSE_SAVED_SEARCHES,
|
collapse_key=Config.Bool.COLLAPSE_SAVED_SEARCHES,
|
||||||
type=SidebarItemType.SAVED_SEARCH_ROOT,
|
type=SidebarItemType.SAVED_SEARCH_ROOT,
|
||||||
)
|
)
|
||||||
|
@ -700,7 +699,6 @@ 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(
|
||||||
|
@ -715,7 +713,7 @@ class SidebarTreeView(QTreeView):
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
item = SidebarItem(
|
item = SidebarItem(
|
||||||
name=node.name,
|
name=node.name,
|
||||||
icon=icon_multiple if node.children else icon,
|
icon=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,
|
||||||
|
@ -730,7 +728,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_multiple,
|
icon=icon,
|
||||||
collapse_key=Config.Bool.COLLAPSE_TAGS,
|
collapse_key=Config.Bool.COLLAPSE_TAGS,
|
||||||
type=SidebarItemType.TAG_ROOT,
|
type=SidebarItemType.TAG_ROOT,
|
||||||
)
|
)
|
||||||
|
@ -749,7 +747,6 @@ class SidebarTreeView(QTreeView):
|
||||||
|
|
||||||
def _deck_tree(self, root: SidebarItem) -> None:
|
def _deck_tree(self, root: SidebarItem) -> None:
|
||||||
icon = ":/icons/book-outline.svg"
|
icon = ":/icons/book-outline.svg"
|
||||||
icon_multiple = ":/icons/book-multiple-outline.svg"
|
|
||||||
icon_current = ":/icons/book-clock-outline.svg"
|
icon_current = ":/icons/book-clock-outline.svg"
|
||||||
icon_filtered = ":/icons/book-cog-outline.svg"
|
icon_filtered = ":/icons/book-cog-outline.svg"
|
||||||
|
|
||||||
|
@ -769,11 +766,7 @@ class SidebarTreeView(QTreeView):
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
item = SidebarItem(
|
item = SidebarItem(
|
||||||
name=node.name,
|
name=node.name,
|
||||||
icon=icon_filtered
|
icon=icon_filtered if node.filtered else icon,
|
||||||
if node.filtered
|
|
||||||
else icon_multiple
|
|
||||||
if node.children
|
|
||||||
else icon,
|
|
||||||
search_node=SearchNode(deck=head + node.name),
|
search_node=SearchNode(deck=head + node.name),
|
||||||
on_expanded=toggle_expand(node),
|
on_expanded=toggle_expand(node),
|
||||||
expanded=not node.collapsed,
|
expanded=not node.collapsed,
|
||||||
|
@ -789,7 +782,7 @@ class SidebarTreeView(QTreeView):
|
||||||
root = self._section_root(
|
root = self._section_root(
|
||||||
root=root,
|
root=root,
|
||||||
name=tr.browsing_sidebar_decks(),
|
name=tr.browsing_sidebar_decks(),
|
||||||
icon=icon_multiple,
|
icon=icon,
|
||||||
collapse_key=Config.Bool.COLLAPSE_DECKS,
|
collapse_key=Config.Bool.COLLAPSE_DECKS,
|
||||||
type=SidebarItemType.DECK_ROOT,
|
type=SidebarItemType.DECK_ROOT,
|
||||||
)
|
)
|
||||||
|
@ -808,15 +801,14 @@ class SidebarTreeView(QTreeView):
|
||||||
###########################
|
###########################
|
||||||
|
|
||||||
def _notetype_tree(self, root: SidebarItem) -> None:
|
def _notetype_tree(self, root: SidebarItem) -> None:
|
||||||
notetype_icon = ":/icons/newspaper-variant-outline.svg"
|
notetype_icon = ":/icons/newspaper.svg"
|
||||||
notetype_multiple_icon = ":/icons/newspaper-variant-multiple-outline.svg"
|
template_icon = ":/icons/iframe-braces-outline.svg"
|
||||||
template_icon = ":/icons/card-bulleted-outline.svg"
|
|
||||||
field_icon = ":/icons/form-textbox.svg"
|
field_icon = ":/icons/form-textbox.svg"
|
||||||
|
|
||||||
root = self._section_root(
|
root = self._section_root(
|
||||||
root=root,
|
root=root,
|
||||||
name=tr.browsing_sidebar_notetypes(),
|
name=tr.browsing_sidebar_notetypes(),
|
||||||
icon=notetype_multiple_icon,
|
icon=notetype_icon,
|
||||||
collapse_key=Config.Bool.COLLAPSE_NOTETYPES,
|
collapse_key=Config.Bool.COLLAPSE_NOTETYPES,
|
||||||
type=SidebarItemType.NOTETYPE_ROOT,
|
type=SidebarItemType.NOTETYPE_ROOT,
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,8 +4,7 @@ copy_mdi_icons(
|
||||||
name = "mdi-icons",
|
name = "mdi-icons",
|
||||||
icons = [
|
icons = [
|
||||||
# saved searches
|
# saved searches
|
||||||
"bookmark-outline.svg",
|
"heart-outline.svg",
|
||||||
"bookmark-multiple-outline.svg",
|
|
||||||
|
|
||||||
# today
|
# today
|
||||||
"clock-outline.svg",
|
"clock-outline.svg",
|
||||||
|
@ -16,21 +15,18 @@ copy_mdi_icons(
|
||||||
|
|
||||||
# decks
|
# decks
|
||||||
"book-outline.svg",
|
"book-outline.svg",
|
||||||
"book-multiple-outline.svg",
|
|
||||||
"book-clock-outline.svg",
|
"book-clock-outline.svg",
|
||||||
"book-cog-outline.svg",
|
"book-cog-outline.svg",
|
||||||
|
|
||||||
# notetypes
|
# notetypes
|
||||||
"newspaper-variant-outline.svg",
|
"newspaper.svg",
|
||||||
"newspaper-variant-multiple-outline.svg",
|
# cardtype
|
||||||
# cards
|
"iframe-braces-outline.svg",
|
||||||
"card-bulleted-outline.svg",
|
|
||||||
# fields
|
# fields
|
||||||
"form-textbox.svg",
|
"form-textbox.svg",
|
||||||
|
|
||||||
# tags
|
# tags
|
||||||
"tag-outline.svg",
|
"tag-outline.svg",
|
||||||
"tag-multiple-outline.svg",
|
|
||||||
"tag-off-outline.svg",
|
"tag-off-outline.svg",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue