mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Add flag icons from mdi after all
- This way, we can also use their modifier versions with little pluses/minuses
This commit is contained in:
parent
bcfbd2f680
commit
8edcc54aae
2 changed files with 8 additions and 3 deletions
|
@ -666,15 +666,16 @@ class SidebarTreeView(QTreeView):
|
||||||
|
|
||||||
def _flags_tree(self, root: SidebarItem) -> None:
|
def _flags_tree(self, root: SidebarItem) -> None:
|
||||||
icon = ":/icons/flag.svg"
|
icon = ":/icons/flag.svg"
|
||||||
|
icon_outline = ":/icons/flag-outline.svg"
|
||||||
|
|
||||||
root = self._section_root(
|
root = self._section_root(
|
||||||
root=root,
|
root=root,
|
||||||
name=tr.browsing_sidebar_flags(),
|
name=tr.browsing_sidebar_flags(),
|
||||||
icon=icon,
|
icon=icon_outline,
|
||||||
collapse_key=Config.Bool.COLLAPSE_FLAGS,
|
collapse_key=Config.Bool.COLLAPSE_FLAGS,
|
||||||
type=SidebarItemType.FLAG_ROOT,
|
type=SidebarItemType.FLAG_ROOT,
|
||||||
)
|
)
|
||||||
root.search_node = SearchNode(flag=SearchNode.FLAG_ANY)
|
root.search_node = SearchNode(flag=SearchNode.FLAG_ANY)
|
||||||
colored_icon = ColoredIcon(path=icon, color=colors.DISABLED)
|
|
||||||
|
|
||||||
for flag in load_flags(self.col):
|
for flag in load_flags(self.col):
|
||||||
root.add_child(
|
root.add_child(
|
||||||
|
@ -689,7 +690,7 @@ class SidebarTreeView(QTreeView):
|
||||||
|
|
||||||
root.add_simple(
|
root.add_simple(
|
||||||
tr.browsing_no_flag(),
|
tr.browsing_no_flag(),
|
||||||
icon=colored_icon,
|
icon=icon_outline,
|
||||||
type=SidebarItemType.FLAG,
|
type=SidebarItemType.FLAG,
|
||||||
search_node=SearchNode(flag=SearchNode.FLAG_NONE),
|
search_node=SearchNode(flag=SearchNode.FLAG_NONE),
|
||||||
)
|
)
|
||||||
|
|
|
@ -13,6 +13,10 @@ copy_mdi_icons(
|
||||||
"circle.svg",
|
"circle.svg",
|
||||||
"circle-outline.svg",
|
"circle-outline.svg",
|
||||||
|
|
||||||
|
# flags
|
||||||
|
"flag.svg",
|
||||||
|
"flag-outline.svg",
|
||||||
|
|
||||||
# decks
|
# decks
|
||||||
"book-outline.svg",
|
"book-outline.svg",
|
||||||
"book-clock-outline.svg",
|
"book-clock-outline.svg",
|
||||||
|
|
Loading…
Reference in a new issue