mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
tweak some icons; move the system tags to the top
This commit is contained in:
parent
1fda0a9bad
commit
db1695a19c
6 changed files with 15 additions and 12 deletions
|
@ -513,9 +513,9 @@ class Browser(QMainWindow):
|
|||
self.onclick = onclick
|
||||
|
||||
def setupTree(self):
|
||||
self._systemTagTree(self.form.tree.invisibleRootItem())
|
||||
self.form.tree.addTopLevelItem(self._modelTree())
|
||||
self.form.tree.addTopLevelItem(self._groupTree())
|
||||
self.form.tree.addTopLevelItem(self._systemTagTree())
|
||||
self.form.tree.addTopLevelItem(self._userTagTree())
|
||||
self.form.tree.expandToDepth(0)
|
||||
self.form.tree.setIndentation(15)
|
||||
|
@ -577,16 +577,16 @@ class Browser(QMainWindow):
|
|||
fillGroups(root, grps)
|
||||
return root
|
||||
|
||||
def _systemTagTree(self):
|
||||
root = QTreeWidgetItem([_("System Tags")])
|
||||
root.setIcon(0, QIcon(":/icons/anki-tag.png"))
|
||||
tags = ((_("New"), "anki-tag.png", "is:new"),
|
||||
(_("Learning"), "anki-tag.png", "is:lrn"),
|
||||
(_("Review"), "anki-tag.png", "is:rev"),
|
||||
(_("Due"), "anki-tag.png", "is:due"),
|
||||
(_("Marked"), "anki-tag.png", "tag:marked"),
|
||||
(_("Suspended"), "anki-tag.png", "is:suspended"),
|
||||
(_("Leech"), "anki-tag.png", "tag:leech"))
|
||||
def _systemTagTree(self, root):
|
||||
tags = (
|
||||
(_("All cards"), "stock_new_template", ""),
|
||||
(_("Never seen"), "stock_new_template_blue.png", "is:new"),
|
||||
(_("In learning"), "stock_new_template_red.png", "is:lrn"),
|
||||
(_("In review"), "stock_new_template_green.png", "is:rev"),
|
||||
(_("Due reviews"), "stock_new_template_green.png", "is:due"),
|
||||
(_("Marked"), "rating.png", "tag:marked"),
|
||||
(_("Suspended"), "media-playback-pause.png", "is:suspended"),
|
||||
(_("Leech"), "emblem-important.png", "tag:leech"))
|
||||
for name, icon, cmd in tags:
|
||||
item = self.CallbackItem(
|
||||
name, lambda c=cmd: self.setFilter(c))
|
||||
|
@ -595,7 +595,7 @@ class Browser(QMainWindow):
|
|||
return root
|
||||
|
||||
def _userTagTree(self):
|
||||
root = QTreeWidgetItem([_("User Tags")])
|
||||
root = QTreeWidgetItem([_("Tags")])
|
||||
root.setIcon(0, QIcon(":/icons/anki-tag.png"))
|
||||
for t in self.deck.tagList():
|
||||
item = self.CallbackItem(
|
||||
|
|
|
@ -99,6 +99,9 @@
|
|||
<file>icons/text_remove.png</file>
|
||||
<file>icons/product_design.png</file>
|
||||
<file>icons/stock_new_template.png</file>
|
||||
<file>icons/stock_new_template_blue.png</file>
|
||||
<file>icons/stock_new_template_green.png</file>
|
||||
<file>icons/stock_new_template_red.png</file>
|
||||
<file>icons/stock_group.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
designer/icons/stock_new_template_blue.png
Normal file
BIN
designer/icons/stock_new_template_blue.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
designer/icons/stock_new_template_green.png
Normal file
BIN
designer/icons/stock_new_template_green.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
BIN
designer/icons/stock_new_template_red.png
Normal file
BIN
designer/icons/stock_new_template_red.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Loading…
Reference in a new issue