Update icons in the GUI

This commit is contained in:
Veronica Berglyd Olsen
2025-01-07 19:19:11 +01:00
parent 8a671dee59
commit b97844512a
25 changed files with 225 additions and 189 deletions
+14
View File
@@ -258,6 +258,20 @@ class nwLabels:
nwItemClass.TEMPLATE: "cls_template",
nwItemClass.TRASH: "cls_trash",
}
CLASS_COLOR = {
nwItemClass.NO_CLASS: "default",
nwItemClass.NOVEL: "red",
nwItemClass.PLOT: "blue",
nwItemClass.CHARACTER: "blue",
nwItemClass.WORLD: "blue",
nwItemClass.TIMELINE: "blue",
nwItemClass.OBJECT: "blue",
nwItemClass.ENTITY: "blue",
nwItemClass.CUSTOM: "blue",
nwItemClass.ARCHIVE: "red",
nwItemClass.TEMPLATE: "yellow",
nwItemClass.TRASH: "red",
}
LAYOUT_NAME = {
nwItemLayout.NO_LAYOUT: QT_TRANSLATE_NOOP("Constant", "None"),
nwItemLayout.DOCUMENT: QT_TRANSLATE_NOOP("Constant", "Novel Document"),
+3 -2
View File
@@ -350,11 +350,12 @@ class NWItem:
"""
if self.isFileType():
key = "checked" if self._active else "unchecked"
color = "green" if self._active else "red"
text = trConst(nwLabels.ACTIVE_NAME[key])
icon = SHARED.theme.getIcon(key)
icon = SHARED.theme.getIcon(key, color)
else:
text = ""
icon = SHARED.theme.getIcon("noncheckable")
icon = SHARED.theme.getIcon("noncheckable", "orange")
return text, icon
##
+8 -8
View File
@@ -363,27 +363,27 @@ class _StatusPage(NFixedPage):
self._addItem(key, StatusEntry.duplicate(entry))
# List Controls
self.addButton = NIconToolButton(self, iSz, "add")
self.addButton = NIconToolButton(self, iSz, "add", "green")
self.addButton.setToolTip(self.tr("Add Label"))
self.addButton.clicked.connect(self._onItemCreate)
self.delButton = NIconToolButton(self, iSz, "remove")
self.delButton = NIconToolButton(self, iSz, "remove", "red")
self.delButton.setToolTip(self.tr("Delete Label"))
self.delButton.clicked.connect(self._onItemDelete)
self.upButton = NIconToolButton(self, iSz, "up")
self.upButton = NIconToolButton(self, iSz, "chevron_up", "blue")
self.upButton.setToolTip(self.tr("Move Up"))
self.upButton.clicked.connect(qtLambda(self._moveItem, -1))
self.downButton = NIconToolButton(self, iSz, "down")
self.downButton = NIconToolButton(self, iSz, "chevron_down", "blue")
self.downButton.setToolTip(self.tr("Move Down"))
self.downButton.clicked.connect(qtLambda(self._moveItem, 1))
self.importButton = NIconToolButton(self, iSz, "import")
self.importButton = NIconToolButton(self, iSz, "import", "green")
self.importButton.setToolTip(self.tr("Import Labels"))
self.importButton.clicked.connect(self._importLabels)
self.exportButton = NIconToolButton(self, iSz, "export")
self.exportButton = NIconToolButton(self, iSz, "export", "blue")
self.exportButton.setToolTip(self.tr("Export Labels"))
self.exportButton.clicked.connect(self._exportLabels)
@@ -704,10 +704,10 @@ class _ReplacePage(NFixedPage):
self.listBox.setSortingEnabled(True)
# List Controls
self.addButton = NIconToolButton(self, iSz, "add")
self.addButton = NIconToolButton(self, iSz, "add", "green")
self.addButton.clicked.connect(self._onEntryCreated)
self.delButton = NIconToolButton(self, iSz, "remove")
self.delButton = NIconToolButton(self, iSz, "remove", "red")
self.delButton.clicked.connect(self._onEntryDeleted)
# Edit Form
+4 -4
View File
@@ -73,11 +73,11 @@ class GuiWordList(NDialog):
scale=NColourLabel.HEADER_SCALE
)
self.importButton = NIconToolButton(self, iSz, "import")
self.importButton = NIconToolButton(self, iSz, "import", "green")
self.importButton.setToolTip(self.tr("Import words from text file"))
self.importButton.clicked.connect(self._importWords)
self.exportButton = NIconToolButton(self, iSz, "export")
self.exportButton = NIconToolButton(self, iSz, "export", "blue")
self.exportButton.setToolTip(self.tr("Export words to text file"))
self.exportButton.clicked.connect(self._exportWords)
@@ -95,11 +95,11 @@ class GuiWordList(NDialog):
# Add/Remove Form
self.newEntry = QLineEdit(self)
self.addButton = NIconToolButton(self, iSz, "add")
self.addButton = NIconToolButton(self, iSz, "add", "green")
self.addButton.setToolTip(self.tr("Add Word"))
self.addButton.clicked.connect(self._doAdd)
self.delButton = NIconToolButton(self, iSz, "remove")
self.delButton = NIconToolButton(self, iSz, "remove", "red")
self.delButton.setToolTip(self.tr("Remove Word"))
self.delButton.clicked.connect(self._doDelete)
+7 -4
View File
@@ -164,18 +164,21 @@ class NDoubleSpinBox(QDoubleSpinBox):
class NIconToolButton(QToolButton):
def __init__(self, parent: QWidget, iconSize: QSize, icon: str | None = None) -> None:
def __init__(
self, parent: QWidget, iconSize: QSize,
icon: str | None = None, color: str | None = None
) -> None:
super().__init__(parent=parent)
self.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonIconOnly)
self.setIconSize(iconSize)
self.setPopupMode(QToolButton.ToolButtonPopupMode.InstantPopup)
if icon:
self.setThemeIcon(icon)
self.setThemeIcon(icon, color)
return
def setThemeIcon(self, iconKey: str) -> None:
def setThemeIcon(self, iconKey: str, color: str | None = None) -> None:
"""Set an icon from the current theme."""
self.setIcon(SHARED.theme.getIcon(iconKey))
self.setIcon(SHARED.theme.getIcon(iconKey, color))
return
+3 -1
View File
@@ -94,7 +94,9 @@ class NovelSelector(QComboBox):
self._firstHandle = None
self.clear()
icon = SHARED.theme.getIcon(nwLabels.CLASS_ICON[nwItemClass.NOVEL])
icon = SHARED.theme.getIcon(
nwLabels.CLASS_ICON[nwItemClass.NOVEL], nwLabels.CLASS_COLOR[nwItemClass.NOVEL]
)
handle = self.currentData()
for tHandle, nwItem in SHARED.project.tree.iterRoots(nwItemClass.NOVEL):
if self._listFormat:
+13 -13
View File
@@ -2438,9 +2438,9 @@ class GuiDocToolBar(QWidget):
palette.setColor(QPalette.ColorRole.Text, SHARED.theme.colText)
self.setPalette(palette)
self.tbBoldMD.setThemeIcon("fmt_bold-md")
self.tbItalicMD.setThemeIcon("fmt_italic-md")
self.tbStrikeMD.setThemeIcon("fmt_strike-md")
self.tbBoldMD.setThemeIcon("fmt_bold", "orange")
self.tbItalicMD.setThemeIcon("fmt_italic", "orange")
self.tbStrikeMD.setThemeIcon("fmt_strike", "orange")
self.tbBold.setThemeIcon("fmt_bold")
self.tbItalic.setThemeIcon("fmt_italic")
self.tbStrike.setThemeIcon("fmt_strike")
@@ -2690,8 +2690,8 @@ class GuiDocEditSearch(QFrame):
self.toggleProject.setIcon(SHARED.theme.getIcon("search_project"))
self.toggleMatchCap.setIcon(SHARED.theme.getIcon("search_preserve"))
self.cancelSearch.setIcon(SHARED.theme.getIcon("search_cancel"))
self.searchButton.setThemeIcon("search")
self.replaceButton.setThemeIcon("search_replace")
self.searchButton.setThemeIcon("search", "green")
self.replaceButton.setThemeIcon("search_replace", "green")
# Set stylesheets
self.searchOpt.setStyleSheet("QToolBar {padding: 0;}")
@@ -2954,11 +2954,11 @@ class GuiDocEditHeader(QWidget):
def updateTheme(self) -> None:
"""Update theme elements."""
self.tbButton.setThemeIcon("toolbar")
self.outlineButton.setThemeIcon("list")
self.searchButton.setThemeIcon("search")
self.minmaxButton.setThemeIcon("maximise")
self.closeButton.setThemeIcon("close")
self.tbButton.setThemeIcon("fmt_toolbar", "blue")
self.outlineButton.setThemeIcon("list", "blue")
self.searchButton.setThemeIcon("search", "blue")
self.minmaxButton.setThemeIcon("maximise", "blue")
self.closeButton.setThemeIcon("close", "red")
buttonStyle = SHARED.theme.getStyleSheet(STYLES_MIN_TOOLBUTTON)
self.tbButton.setStyleSheet(buttonStyle)
@@ -3031,7 +3031,7 @@ class GuiDocEditHeader(QWidget):
@pyqtSlot(bool)
def _focusModeChanged(self, focusMode: bool) -> None:
"""Update minimise/maximise icon of the Focus Mode button."""
self.minmaxButton.setThemeIcon("minimise" if focusMode else "maximise")
self.minmaxButton.setThemeIcon("minimise" if focusMode else "maximise", "blue")
return
##
@@ -3165,8 +3165,8 @@ class GuiDocEditFooter(QWidget):
def updateTheme(self) -> None:
"""Update theme elements."""
iPx = round(0.9*SHARED.theme.baseIconHeight)
self.linesIcon.setPixmap(SHARED.theme.getPixmap("status_lines", (iPx, iPx)))
self.wordsIcon.setPixmap(SHARED.theme.getPixmap("status_stats", (iPx, iPx)))
self.linesIcon.setPixmap(SHARED.theme.getPixmap("lines", (iPx, iPx)))
self.wordsIcon.setPixmap(SHARED.theme.getPixmap("stats", (iPx, iPx)))
self.matchColours()
return
+7 -7
View File
@@ -760,12 +760,12 @@ class GuiDocViewHeader(QWidget):
def updateTheme(self) -> None:
"""Update theme elements."""
self.outlineButton.setThemeIcon("list")
self.backButton.setThemeIcon("backward")
self.forwardButton.setThemeIcon("forward")
self.editButton.setThemeIcon("edit")
self.refreshButton.setThemeIcon("refresh")
self.closeButton.setThemeIcon("close")
self.outlineButton.setThemeIcon("list", "blue")
self.backButton.setThemeIcon("chevron_left", "blue")
self.forwardButton.setThemeIcon("chevron_right", "blue")
self.editButton.setThemeIcon("edit", "green")
self.refreshButton.setThemeIcon("refresh", "green")
self.closeButton.setThemeIcon("close", "red")
buttonStyle = SHARED.theme.getStyleSheet(STYLES_MIN_TOOLBUTTON)
self.outlineButton.setStyleSheet(buttonStyle)
@@ -951,7 +951,7 @@ class GuiDocViewFooter(QWidget):
"""Update theme elements."""
# Icons
fPx = int(0.9*SHARED.theme.fontPixelSize)
bulletIcon = SHARED.theme.getToggleIcon("bullet", (fPx, fPx))
bulletIcon = SHARED.theme.getToggleIcon("bullet", (fPx, fPx), "blue")
self.showHide.setThemeIcon("panel")
self.showComments.setIcon(bulletIcon)
+15 -11
View File
@@ -101,7 +101,7 @@ class GuiDocViewerPanel(QWidget):
def updateTheme(self, updateTabs: bool = True) -> None:
"""Update theme elements."""
self.optsButton.setThemeIcon("menu")
self.optsButton.setThemeIcon("more_vertical")
self.optsButton.setStyleSheet(SHARED.theme.getStyleSheet(STYLES_MIN_TOOLBUTTON))
self.mainTabs.setStyleSheet(SHARED.theme.getStyleSheet(STYLES_FLAT_TABS))
self.updateHandle(self._lastHandle)
@@ -268,8 +268,8 @@ class _ViewPanelBackRefs(QTreeWidget):
treeHeader.setSectionsMovable(False)
# Cache Icons Locally
self._editIcon = SHARED.theme.getIcon("edit")
self._viewIcon = SHARED.theme.getIcon("view")
self._editIcon = SHARED.theme.getIcon("edit", "green")
self._viewIcon = SHARED.theme.getIcon("view", "blue")
# Signals
self.clicked.connect(self._treeItemClicked)
@@ -279,8 +279,8 @@ class _ViewPanelBackRefs(QTreeWidget):
def updateTheme(self) -> None:
"""Update theme elements."""
self._editIcon = SHARED.theme.getIcon("edit")
self._viewIcon = SHARED.theme.getIcon("view")
self._editIcon = SHARED.theme.getIcon("edit", "green")
self._viewIcon = SHARED.theme.getIcon("view", "blue")
for i in range(self.topLevelItemCount()):
if item := self.topLevelItem(i):
item.setIcon(self.C_EDIT, self._editIcon)
@@ -410,9 +410,11 @@ class _ViewPanelKeyWords(QTreeWidget):
treeHeader.setSectionsMovable(False)
# Cache Icons Locally
self._classIcon = SHARED.theme.getIcon(nwLabels.CLASS_ICON[itemClass])
self._editIcon = SHARED.theme.getIcon("edit")
self._viewIcon = SHARED.theme.getIcon("view")
self._classIcon = SHARED.theme.getIcon(
nwLabels.CLASS_ICON[itemClass], nwLabels.CLASS_COLOR[itemClass]
)
self._editIcon = SHARED.theme.getIcon("edit", "green")
self._viewIcon = SHARED.theme.getIcon("view", "blue")
# Signals
self.clicked.connect(self._treeItemClicked)
@@ -422,9 +424,11 @@ class _ViewPanelKeyWords(QTreeWidget):
def updateTheme(self) -> None:
"""Update theme elements."""
self._classIcon = SHARED.theme.getIcon(nwLabels.CLASS_ICON[self._class])
self._editIcon = SHARED.theme.getIcon("edit")
self._viewIcon = SHARED.theme.getIcon("view")
self._classIcon = SHARED.theme.getIcon(
nwLabels.CLASS_ICON[self._class], nwLabels.CLASS_COLOR[self._class]
)
self._editIcon = SHARED.theme.getIcon("edit", "green")
self._viewIcon = SHARED.theme.getIcon("view", "blue")
for i in range(self.topLevelItemCount()):
if item := self.topLevelItem(i):
item.setIcon(self.C_EDIT, self._editIcon)
+6 -4
View File
@@ -237,11 +237,11 @@ class GuiItemDetails(QWidget):
if nwItem.isFileType():
if nwItem.isActive:
self.labelIcon.setPixmap(SHARED.theme.getPixmap("checked", (iPx, iPx)))
self.labelIcon.setPixmap(SHARED.theme.getPixmap("checked", (iPx, iPx), "green"))
else:
self.labelIcon.setPixmap(SHARED.theme.getPixmap("unchecked", (iPx, iPx)))
self.labelIcon.setPixmap(SHARED.theme.getPixmap("unchecked", (iPx, iPx), "red"))
else:
self.labelIcon.setPixmap(SHARED.theme.getPixmap("noncheckable", (iPx, iPx)))
self.labelIcon.setPixmap(SHARED.theme.getPixmap("noncheckable", (iPx, iPx), "orange"))
self.labelData.setText(elide(nwItem.itemName, 100))
@@ -255,7 +255,9 @@ class GuiItemDetails(QWidget):
# Class
# =====
classIcon = SHARED.theme.getIcon(nwLabels.CLASS_ICON[nwItem.itemClass])
classIcon = SHARED.theme.getIcon(
nwLabels.CLASS_ICON[nwItem.itemClass], nwLabels.CLASS_COLOR[nwItem.itemClass]
)
self.classIcon.setPixmap(classIcon.pixmap(iPx, iPx))
self.classData.setText(trConst(nwLabels.CLASS_NAME[nwItem.itemClass]))
+2 -2
View File
@@ -268,8 +268,8 @@ class GuiNovelToolBar(QWidget):
"""Update theme elements."""
# Icons
self.tbNovel.setThemeIcon("cls_novel")
self.tbRefresh.setThemeIcon("refresh")
self.tbMore.setThemeIcon("menu")
self.tbRefresh.setThemeIcon("refresh", "green")
self.tbMore.setThemeIcon("more_vertical")
qPalette = self.palette()
qPalette.setBrush(QPalette.ColorRole.Window, qPalette.base())
+3 -3
View File
@@ -268,9 +268,9 @@ class GuiOutlineToolBar(QToolBar):
"""Update theme elements."""
self.setStyleSheet("QToolBar {border: 0px;}")
self.novelValue.refreshNovelList()
self.aRefresh.setIcon(SHARED.theme.getIcon("refresh"))
self.aExport.setIcon(SHARED.theme.getIcon("export"))
self.tbColumns.setIcon(SHARED.theme.getIcon("menu"))
self.aRefresh.setIcon(SHARED.theme.getIcon("refresh", "green"))
self.aExport.setIcon(SHARED.theme.getIcon("export", "blue"))
self.tbColumns.setIcon(SHARED.theme.getIcon("more_vertical"))
self.tbColumns.setStyleSheet("QToolButton::menu-indicator {image: none;}")
self.novelLabel.setTextColors(color=self.palette().windowText().color())
return
+16 -12
View File
@@ -363,17 +363,17 @@ class GuiProjectToolBar(QWidget):
self.tbAdd.setStyleSheet(buttonStyle)
self.tbMore.setStyleSheet(buttonStyle)
self.tbQuick.setThemeIcon("bookmark")
self.tbMoveU.setThemeIcon("up")
self.tbMoveD.setThemeIcon("down")
self.tbAdd.setThemeIcon("add")
self.tbMore.setThemeIcon("menu")
self.tbQuick.setThemeIcon("bookmarks", "blue")
self.tbMoveU.setThemeIcon("chevron_up", "blue")
self.tbMoveD.setThemeIcon("chevron_down", "blue")
self.tbAdd.setThemeIcon("add", "green")
self.tbMore.setThemeIcon("more_vertical")
self.aAddEmpty.setIcon(SHARED.theme.getIcon("proj_document"))
self.aAddChap.setIcon(SHARED.theme.getIcon("proj_chapter"))
self.aAddScene.setIcon(SHARED.theme.getIcon("proj_scene"))
self.aAddNote.setIcon(SHARED.theme.getIcon("proj_note"))
self.aAddFolder.setIcon(SHARED.theme.getIcon("proj_folder"))
self.aAddEmpty.setIcon(SHARED.theme.getIcon("document"))
self.aAddChap.setIcon(SHARED.theme.getIcon("document", "red"))
self.aAddScene.setIcon(SHARED.theme.getIcon("document", "blue"))
self.aAddNote.setIcon(SHARED.theme.getIcon("document", "yellow"))
self.aAddFolder.setIcon(SHARED.theme.getIcon("folder"))
self.buildTemplatesMenu()
self.buildQuickLinksMenu()
@@ -394,7 +394,9 @@ class GuiProjectToolBar(QWidget):
for tHandle, nwItem in SHARED.project.tree.iterRoots(None):
action = self.mQuick.addAction(nwItem.itemName)
action.setData(tHandle)
action.setIcon(SHARED.theme.getIcon(nwLabels.CLASS_ICON[nwItem.itemClass]))
action.setIcon(SHARED.theme.getIcon(
nwLabels.CLASS_ICON[nwItem.itemClass], nwLabels.CLASS_COLOR[nwItem.itemClass]
))
action.triggered.connect(
qtLambda(self.projView.setSelectedHandle, tHandle, doScroll=True)
)
@@ -441,7 +443,9 @@ class GuiProjectToolBar(QWidget):
"""Build the rood folder menu."""
def addClass(itemClass: nwItemClass) -> None:
aNew = self.mAddRoot.addAction(trConst(nwLabels.CLASS_NAME[itemClass]))
aNew.setIcon(SHARED.theme.getIcon(nwLabels.CLASS_ICON[itemClass]))
aNew.setIcon(SHARED.theme.getIcon(
nwLabels.CLASS_ICON[itemClass], nwLabels.CLASS_COLOR[itemClass]
))
aNew.triggered.connect(
qtLambda(self.projTree.newTreeItem, nwItemType.ROOT, itemClass)
)
+2 -2
View File
@@ -105,7 +105,7 @@ class GuiProjectSearch(QWidget):
self.searchText.setClearButtonEnabled(True)
self.searchAction = self.searchText.addAction(
SHARED.theme.getIcon("search"), QLineEdit.ActionPosition.TrailingPosition
SHARED.theme.getIcon("search", "blue"), QLineEdit.ActionPosition.TrailingPosition
)
self.searchAction.triggered.connect(self._processSearch)
@@ -173,7 +173,7 @@ class GuiProjectSearch(QWidget):
f"QLineEdit:focus {{border: {bPx}px solid {colFocus};}} "
)
self.searchAction.setIcon(SHARED.theme.getIcon("search"))
self.searchAction.setIcon(SHARED.theme.getIcon("search", "blue"))
self.toggleCase.setIcon(SHARED.theme.getIcon("search_case"))
self.toggleWord.setIcon(SHARED.theme.getIcon("search_word"))
self.toggleRegEx.setIcon(SHARED.theme.getIcon("search_regex"))
+7 -7
View File
@@ -140,13 +140,13 @@ class GuiSideBar(QWidget):
self.tbStats.setStyleSheet(buttonStyle)
self.tbSettings.setStyleSheet(buttonStyle)
self.tbProject.setThemeIcon("view_editor")
self.tbNovel.setThemeIcon("view_novel")
self.tbSearch.setThemeIcon("view_search")
self.tbOutline.setThemeIcon("view_outline")
self.tbBuild.setThemeIcon("view_build")
self.tbDetails.setThemeIcon("proj_details")
self.tbStats.setThemeIcon("proj_stats")
self.tbProject.setThemeIcon("project_view")
self.tbNovel.setThemeIcon("novel_view")
self.tbSearch.setThemeIcon("search")
self.tbOutline.setThemeIcon("outline")
self.tbBuild.setThemeIcon("manuscript")
self.tbDetails.setThemeIcon("list")
self.tbStats.setThemeIcon("stats")
self.tbSettings.setThemeIcon("settings")
return
+4 -4
View File
@@ -129,10 +129,10 @@ class GuiMainStatus(QStatusBar):
def updateTheme(self) -> None:
"""Update theme elements."""
iPx = SHARED.theme.baseIconHeight
self.langIcon.setPixmap(SHARED.theme.getPixmap("status_lang", (iPx, iPx)))
self.statsIcon.setPixmap(SHARED.theme.getPixmap("status_stats", (iPx, iPx)))
self.timePixmap = SHARED.theme.getPixmap("status_time", (iPx, iPx))
self.idlePixmap = SHARED.theme.getPixmap("status_idle", (iPx, iPx))
self.langIcon.setPixmap(SHARED.theme.getPixmap("language", (iPx, iPx)))
self.statsIcon.setPixmap(SHARED.theme.getPixmap("stats", (iPx, iPx)))
self.timePixmap = SHARED.theme.getPixmap("timer", (iPx, iPx))
self.idlePixmap = SHARED.theme.getPixmap("timer_off", (iPx, iPx))
self.timeIcon.setPixmap(self.timePixmap)
colNone = SHARED.theme.statNone
+29 -61
View File
@@ -501,36 +501,7 @@ class GuiIcons:
ICON_KEYS: set[str] = {
# Project and GUI Icons
"novelwriter", "alert_error", "alert_info", "alert_question", "alert_warn",
"build_excluded", "build_filtered", "build_included", "proj_chapter", "proj_details",
"proj_document", "proj_folder", "proj_note", "proj_nwx", "proj_section", "proj_scene",
"proj_stats", "proj_title", "status_idle", "status_lang", "status_lines", "status_stats",
"status_time", "view_build", "view_editor", "view_novel", "view_outline", "view_search",
# Class Icons
"cls_archive", "cls_character", "cls_custom", "cls_entity", "cls_none", "cls_novel",
"cls_object", "cls_plot", "cls_template", "cls_timeline", "cls_trash", "cls_world",
# Search Icons
"search_cancel", "search_case", "search_loop", "search_preserve", "search_project",
"search_regex", "search_word",
# Format Icons
"fmt_bold", "fmt_bold-md", "fmt_italic", "fmt_italic-md", "fmt_mark", "fmt_strike",
"fmt_strike-md", "fmt_subscript", "fmt_superscript", "fmt_underline", "margin_bottom",
"margin_left", "margin_right", "margin_top", "size_height", "size_width",
# General Button Icons
"add", "add_document", "backward", "bookmark", "browse", "checked", "close", "copy",
"cross", "document", "down", "edit", "export", "font", "forward", "import", "list",
"maximise", "menu", "minimise", "more", "noncheckable", "open", "panel", "quote",
"refresh", "remove", "revert", "search_replace", "search", "settings", "star", "toolbar",
"unchecked", "up", "view",
# Switches
"sticky-on", "sticky-off",
"bullet-on", "bullet-off",
"unfold-show", "unfold-hide",
"novelwriter", "proj_nwx"
# Decorations
"deco_doc_h0", "deco_doc_h1", "deco_doc_h2", "deco_doc_h3", "deco_doc_h4", "deco_doc_more",
@@ -539,7 +510,6 @@ class GuiIcons:
}
TOGGLE_ICON_KEYS: dict[str, tuple[str, str]] = {
"sticky": ("sticky-on", "sticky-off"),
"bullet": ("bullet-on", "bullet-off"),
"unfold": ("unfold-show", "unfold-hide"),
}
@@ -631,7 +601,7 @@ class GuiIcons:
iconPath = themePath / iconFile
if iconPath.is_file():
self._themeMap[iconName] = iconPath
logger.debug("Icon slot '%s' using file '%s'", iconName, iconFile)
# logger.debug("Icon slot '%s' using file '%s'", iconName, iconFile)
else:
logger.error("Icon file '%s' not in theme folder", iconFile)
@@ -657,7 +627,7 @@ class GuiIcons:
def loadNewTheme(self, iconTheme: str) -> bool:
"""Load new style theme."""
themePath = self._iconPath / "material_outline_normal.icons"
themePath = self._iconPath / "material_outline_bold.icons"
with open(themePath, mode="r", encoding="utf-8") as icons:
for icon in icons:
key, _, svg = icon.partition(" = ")
@@ -703,60 +673,62 @@ class GuiIcons:
return pixmap
def getIcon(self, name: str, color: str | None = None) -> QIcon:
def getIcon(self, name: str, color: str | None = None, w: int = 24, h: int = 24) -> QIcon:
"""Return an icon from the icon buffer, or load it."""
key = f"{name}_{color}" if color else name
if key in self._qIcons:
return self._qIcons[name]
variant = f"{name}-{color}" if color else name
if (key := f"{variant}-{w}x{h}") in self._qIcons:
return self._qIcons[key]
else:
icon = self._loadIcon(name, color)
icon = self._loadIcon(name, color, w, h)
self._qIcons[key] = icon
logger.info("Icon: %s", key)
return icon
def getToggleIcon(self, name: str, size: tuple[int, int]) -> QIcon:
def getToggleIcon(self, name: str, size: tuple[int, int], color: str | None = None) -> QIcon:
"""Return a toggle icon from the icon buffer. or load it."""
if name in self.TOGGLE_ICON_KEYS:
pOne = self.getPixmap(self.TOGGLE_ICON_KEYS[name][0], size)
pTwo = self.getPixmap(self.TOGGLE_ICON_KEYS[name][1], size)
pOne = self.getPixmap(self.TOGGLE_ICON_KEYS[name][0], size, color)
pTwo = self.getPixmap(self.TOGGLE_ICON_KEYS[name][1], size, color)
icon = QIcon()
icon.addPixmap(pOne, QIcon.Mode.Normal, QIcon.State.On)
icon.addPixmap(pTwo, QIcon.Mode.Normal, QIcon.State.Off)
return icon
return self._noIcon
def getPixmap(self, name: str, size: tuple[int, int]) -> QPixmap:
def getPixmap(self, name: str, size: tuple[int, int], color: str | None = None) -> QPixmap:
"""Return an icon from the icon buffer as a QPixmap. If it
doesn't exist, return an empty QPixmap.
"""
return self.getIcon(name).pixmap(size[0], size[1], QIcon.Mode.Normal)
w, h = size
return self.getIcon(name, color, w, h).pixmap(w, h, QIcon.Mode.Normal)
def getItemIcon(self, tType: nwItemType, tClass: nwItemClass,
tLayout: nwItemLayout, hLevel: str = "H0") -> QIcon:
"""Get the correct icon for a project item based on type, class
and heading level
"""
iconName = None
name = None
color = "default"
if tType == nwItemType.ROOT:
iconName = nwLabels.CLASS_ICON[tClass]
name = nwLabels.CLASS_ICON[tClass]
color = nwLabels.CLASS_COLOR[tClass]
elif tType == nwItemType.FOLDER:
iconName = "proj_folder"
name = "folder"
elif tType == nwItemType.FILE:
iconName = "proj_document"
name = "document"
if tLayout == nwItemLayout.DOCUMENT:
if hLevel == "H1":
iconName = "proj_title"
color = "green"
elif hLevel == "H2":
iconName = "proj_chapter"
color = "red"
elif hLevel == "H3":
iconName = "proj_scene"
elif hLevel == "H4":
iconName = "proj_section"
color = "blue"
elif tLayout == nwItemLayout.NOTE:
iconName = "proj_note"
if iconName is None:
color = "yellow"
if name is None:
return self._noIcon
return self.getIcon(iconName)
return self.getIcon(name, color)
def getHeaderDecoration(self, hLevel: int) -> QPixmap:
"""Get the decoration for a specific heading level."""
@@ -789,14 +761,10 @@ class GuiIcons:
# Internal Functions
##
def _loadIcon(self, name: str, color: str | None = None) -> QIcon:
def _loadIcon(self, name: str, color: str | None = None, w: int = 24, h: int = 24) -> QIcon:
"""Load an icon from the assets themes folder. Is guaranteed to
return a QIcon.
"""
# if name not in self.ICON_KEYS:
# logger.error("Requested unknown icon name '%s'", name)
# return self._noIcon
# If we just want the app icons, return right away
if name == "novelwriter":
return QIcon(str(self._iconPath / "novelwriter.svg"))
@@ -806,7 +774,7 @@ class GuiIcons:
if svg := self._svgData.get(name, b""):
if fill := self._svgColours.get(color or "default"):
svg = svg.replace(b"#000000", fill)
pixmap = QPixmap(24, 24)
pixmap = QPixmap(w, h)
pixmap.fill(QtTransparent)
pixmap.loadFromData(svg, "svg")
return QIcon(pixmap)
+4 -4
View File
@@ -485,15 +485,15 @@ class _GuiAlert(QMessageBox):
self.setStandardButtons(QMessageBox.StandardButton.Ok)
pSz = 2*self._theme.baseIconHeight
if level == self.INFO:
self.setIconPixmap(self._theme.getPixmap("alert_info", (pSz, pSz)))
self.setIconPixmap(self._theme.getPixmap("alert_info", (pSz, pSz), "blue"))
self.setWindowTitle(self.tr("Information"))
elif level == self.WARN:
self.setIconPixmap(self._theme.getPixmap("alert_warn", (pSz, pSz)))
self.setIconPixmap(self._theme.getPixmap("alert_warn", (pSz, pSz), "orange"))
self.setWindowTitle(self.tr("Warning"))
elif level == self.ERROR:
self.setIconPixmap(self._theme.getPixmap("alert_error", (pSz, pSz)))
self.setIconPixmap(self._theme.getPixmap("alert_error", (pSz, pSz), "red"))
self.setWindowTitle(self.tr("Error"))
elif level == self.ASK:
self.setIconPixmap(self._theme.getPixmap("alert_question", (pSz, pSz)))
self.setIconPixmap(self._theme.getPixmap("alert_question", (pSz, pSz), "blue"))
self.setWindowTitle(self.tr("Question"))
return
+1 -1
View File
@@ -78,7 +78,7 @@ class GuiDictionaries(NNonBlockingDialog):
self.huBrowse = NIconToolButton(self, iSz, "browse")
self.huBrowse.clicked.connect(self._doBrowseHunspell)
self.huImport = QPushButton(self.tr("Add Dictionary"), self)
self.huImport.setIcon(SHARED.theme.getIcon("add"))
self.huImport.setIcon(SHARED.theme.getIcon("add", "green"))
self.huImport.clicked.connect(self._doImportHunspell)
self.huPathBox = QHBoxLayout()
+1 -1
View File
@@ -60,7 +60,7 @@ class GuiLipsum(NDialog):
# Icon
self.docIcon = QLabel(self)
self.docIcon.setPixmap(SHARED.theme.getPixmap("proj_document", (nPx, nPx)))
self.docIcon.setPixmap(SHARED.theme.getPixmap("document", (nPx, nPx), "blue"))
self.leftBox = QVBoxLayout()
self.leftBox.setSpacing(vSp)
+7 -3
View File
@@ -154,7 +154,7 @@ class GuiManuscriptBuild(NDialog):
# Build Name
self.lblName = QLabel(self.tr("File Name"), self)
self.buildName = QLineEdit(self)
self.btnReset = NIconToolButton(self, iSz, "revert")
self.btnReset = NIconToolButton(self, iSz, "revert", "green")
self.btnReset.setToolTip(self.tr("Reset file name to default"))
self.nameBox = QHBoxLayout()
@@ -181,12 +181,16 @@ class GuiManuscriptBuild(NDialog):
# Dialog Buttons
self.buttonBox = QDialogButtonBox(self)
self.btnOpen = QPushButton(SHARED.theme.getIcon("browse"), self.tr("Open Folder"), self)
self.btnOpen = QPushButton(
SHARED.theme.getIcon("browse", "yellow"), self.tr("Open Folder"), self
)
self.btnOpen.setIconSize(bSz)
self.btnOpen.setAutoDefault(False)
self.buttonBox.addButton(self.btnOpen, QtRoleAction)
self.btnBuild = QPushButton(SHARED.theme.getIcon("export"), self.tr("&Build"), self)
self.btnBuild = QPushButton(
SHARED.theme.getIcon("manuscript", "blue"), self.tr("&Build"), self
)
self.btnBuild.setIconSize(bSz)
self.btnBuild.setAutoDefault(True)
self.buttonBox.addButton(self.btnBuild, QtRoleAction)
+6 -6
View File
@@ -108,7 +108,7 @@ class GuiManuscript(NToolDialog):
buttonStyle = SHARED.theme.getStyleSheet(STYLES_MIN_TOOLBUTTON)
self.tbAdd = NIconToolButton(self, iSz, "add")
self.tbAdd = NIconToolButton(self, iSz, "add", "green")
self.tbAdd.setToolTip(self.tr("Add New Build"))
self.tbAdd.setStyleSheet(buttonStyle)
self.tbAdd.clicked.connect(self._createNewBuild)
@@ -118,12 +118,12 @@ class GuiManuscript(NToolDialog):
self.tbDel.setStyleSheet(buttonStyle)
self.tbDel.clicked.connect(self._deleteSelectedBuild)
self.tbCopy = NIconToolButton(self, iSz, "copy")
self.tbCopy = NIconToolButton(self, iSz, "copy", "blue")
self.tbCopy.setToolTip(self.tr("Duplicate Selected Build"))
self.tbCopy.setStyleSheet(buttonStyle)
self.tbCopy.clicked.connect(self._copySelectedBuild)
self.tbEdit = NIconToolButton(self, iSz, "edit")
self.tbEdit = NIconToolButton(self, iSz, "edit", "green")
self.tbEdit.setToolTip(self.tr("Edit Selected Build"))
self.tbEdit.setStyleSheet(buttonStyle)
self.tbEdit.clicked.connect(self._editSelectedBuild)
@@ -490,7 +490,7 @@ class GuiManuscript(NToolDialog):
for key, name in self._builds.builds():
bItem = QListWidgetItem()
bItem.setText(name)
bItem.setIcon(SHARED.theme.getIcon("export"))
bItem.setIcon(SHARED.theme.getIcon("manuscript", "blue"))
bItem.setData(self.D_KEY, key)
self.buildList.addItem(bItem)
self._buildMap[key] = bItem
@@ -585,8 +585,8 @@ class _DetailsWidget(QWidget):
self.listView.clear()
on = SHARED.theme.getIcon("bullet-on")
off = SHARED.theme.getIcon("bullet-off")
on = SHARED.theme.getIcon("bullet-on", "blue")
off = SHARED.theme.getIcon("bullet-off", "blue")
# Name
item = QTreeWidgetItem()
+17 -17
View File
@@ -287,9 +287,9 @@ class _FilterTab(NFixedPage):
self._statusFlags: dict[int, QIcon] = {
self.F_NONE: QIcon(),
self.F_FILTERED: SHARED.theme.getIcon("build_filtered"),
self.F_INCLUDED: SHARED.theme.getIcon("build_included"),
self.F_EXCLUDED: SHARED.theme.getIcon("build_excluded"),
self.F_FILTERED: SHARED.theme.getIcon("filter", "orange"),
self.F_INCLUDED: SHARED.theme.getIcon("pin", "blue"),
self.F_EXCLUDED: SHARED.theme.getIcon("exclude", "red"),
}
self._trIncluded = self.tr("Included in manuscript")
@@ -337,7 +337,7 @@ class _FilterTab(NFixedPage):
self.excludedButton.setIcon(self._statusFlags[self.F_EXCLUDED])
self.excludedButton.clicked.connect(qtLambda(self._setSelectedMode, self.F_EXCLUDED))
self.resetButton = NIconToolButton(self, iSz, "revert")
self.resetButton = NIconToolButton(self, iSz, "revert", "green")
self.resetButton.setToolTip(self.tr("Reset to default"))
self.resetButton.clicked.connect(qtLambda(self._setSelectedMode, self.F_FILTERED))
@@ -459,19 +459,19 @@ class _FilterTab(NFixedPage):
self.filterOpt.clear()
self.filterOpt.addLabel(self._build.getLabel("filter"))
self.filterOpt.addItem(
SHARED.theme.getIcon("proj_scene"),
SHARED.theme.getIcon("document", "blue"),
self._build.getLabel("filter.includeNovel"),
"doc:filter.includeNovel",
default=self._build.getBool("filter.includeNovel")
)
self.filterOpt.addItem(
SHARED.theme.getIcon("proj_note"),
SHARED.theme.getIcon("document", "yellow"),
self._build.getLabel("filter.includeNotes"),
"doc:filter.includeNotes",
default=self._build.getBool("filter.includeNotes")
)
self.filterOpt.addItem(
SHARED.theme.getIcon("unchecked"),
SHARED.theme.getIcon("unchecked", "red"),
self._build.getLabel("filter.includeInactive"),
"doc:filter.includeInactive",
default=self._build.getBool("filter.includeInactive")
@@ -572,7 +572,7 @@ class _HeadingsTab(NScrollablePage):
self.lblPart = QLabel(self._build.getLabel("headings.fmtPart"), self)
self.fmtPart = QLineEdit("", self)
self.fmtPart.setReadOnly(True)
self.btnPart = NIconToolButton(self, iSz, "edit")
self.btnPart = NIconToolButton(self, iSz, "edit", "green")
self.btnPart.clicked.connect(qtLambda(self._editHeading, self.EDIT_TITLE))
self.hdePart = QLabel(trHide, self)
self.hdePart.setIndent(bSp)
@@ -588,7 +588,7 @@ class _HeadingsTab(NScrollablePage):
self.lblChapter = QLabel(self._build.getLabel("headings.fmtChapter"), self)
self.fmtChapter = QLineEdit("", self)
self.fmtChapter.setReadOnly(True)
self.btnChapter = NIconToolButton(self, iSz, "edit")
self.btnChapter = NIconToolButton(self, iSz, "edit", "green")
self.btnChapter.clicked.connect(qtLambda(self._editHeading, self.EDIT_CHAPTER))
self.hdeChapter = QLabel(trHide, self)
self.hdeChapter.setIndent(bSp)
@@ -604,7 +604,7 @@ class _HeadingsTab(NScrollablePage):
self.lblUnnumbered = QLabel(self._build.getLabel("headings.fmtUnnumbered"), self)
self.fmtUnnumbered = QLineEdit("", self)
self.fmtUnnumbered.setReadOnly(True)
self.btnUnnumbered = NIconToolButton(self, iSz, "edit")
self.btnUnnumbered = NIconToolButton(self, iSz, "edit", "green")
self.btnUnnumbered.clicked.connect(qtLambda(self._editHeading, self.EDIT_UNNUM))
self.hdeUnnumbered = QLabel(trHide, self)
self.hdeUnnumbered.setIndent(bSp)
@@ -620,7 +620,7 @@ class _HeadingsTab(NScrollablePage):
self.lblScene = QLabel(self._build.getLabel("headings.fmtScene"), self)
self.fmtScene = QLineEdit("", self)
self.fmtScene.setReadOnly(True)
self.btnScene = NIconToolButton(self, iSz, "edit")
self.btnScene = NIconToolButton(self, iSz, "edit", "green")
self.btnScene.clicked.connect(qtLambda(self._editHeading, self.EDIT_SCENE))
self.hdeScene = QLabel(trHide, self)
self.hdeScene.setIndent(bSp)
@@ -636,7 +636,7 @@ class _HeadingsTab(NScrollablePage):
self.lblAScene = QLabel(self._build.getLabel("headings.fmtAltScene"), self)
self.fmtAScene = QLineEdit("", self)
self.fmtAScene.setReadOnly(True)
self.btnAScene = NIconToolButton(self, iSz, "edit")
self.btnAScene = NIconToolButton(self, iSz, "edit", "green")
self.btnAScene.clicked.connect(qtLambda(self._editHeading, self.EDIT_HSCENE))
self.hdeAScene = QLabel(trHide, self)
self.hdeAScene.setIndent(bSp)
@@ -652,7 +652,7 @@ class _HeadingsTab(NScrollablePage):
self.lblSection = QLabel(self._build.getLabel("headings.fmtSection"), self)
self.fmtSection = QLineEdit("", self)
self.fmtSection.setReadOnly(True)
self.btnSection = NIconToolButton(self, iSz, "edit")
self.btnSection = NIconToolButton(self, iSz, "edit", "green")
self.btnSection.clicked.connect(qtLambda(self._editHeading, self.EDIT_SECTION))
self.hdeSection = QLabel(trHide, self)
self.hdeSection.setIndent(bSp)
@@ -977,7 +977,7 @@ class _FormattingTab(NScrollableForm):
lambda keyword=keyword: self._updateIgnoredKeywords(keyword)
)
self.ignoredKeywordsButton = NIconToolButton(self, iSz, "add")
self.ignoredKeywordsButton = NIconToolButton(self, iSz, "add", "green")
self.ignoredKeywordsButton.setMenu(self.mnKeywords)
self.addRow(
self._build.getLabel("text.ignoredKeywords"), self.ignoredKeywords,
@@ -1063,8 +1063,8 @@ class _FormattingTab(NScrollableForm):
pixB = SHARED.theme.getPixmap("margin_bottom", (iPx, iPx))
pixL = SHARED.theme.getPixmap("margin_left", (iPx, iPx))
pixR = SHARED.theme.getPixmap("margin_right", (iPx, iPx))
pixH = SHARED.theme.getPixmap("size_height", (iPx, iPx))
pixW = SHARED.theme.getPixmap("size_width", (iPx, iPx))
pixH = SHARED.theme.getPixmap("fit_height", (iPx, iPx))
pixW = SHARED.theme.getPixmap("fit_width", (iPx, iPx))
# Title
self.titleMarginT = NDoubleSpinBox(self)
@@ -1223,7 +1223,7 @@ class _FormattingTab(NScrollableForm):
# Header
self.odtPageHeader = QLineEdit(self)
self.odtPageHeader.setMinimumWidth(CONFIG.pxInt(200))
self.btnPageHeader = NIconToolButton(self, iSz, "revert")
self.btnPageHeader = NIconToolButton(self, iSz, "revert", "green")
self.btnPageHeader.clicked.connect(self._resetPageHeader)
self.addRow(
self._build.getLabel("doc.pageHeader"), self.odtPageHeader,
+10 -10
View File
@@ -110,32 +110,32 @@ class GuiWelcome(NDialog):
# =======
self.btnList = QPushButton(self.tr("List"), self)
self.btnList.setIcon(SHARED.theme.getIcon("list"))
self.btnList.setIcon(SHARED.theme.getIcon("list", "blue"))
self.btnList.setIconSize(btnIconSize)
self.btnList.clicked.connect(self._showOpenProjectPage)
self.btnNew = QPushButton(self.tr("New"), self)
self.btnNew.setIcon(SHARED.theme.getIcon("add"))
self.btnNew.setIcon(SHARED.theme.getIcon("add", "green"))
self.btnNew.setIconSize(btnIconSize)
self.btnNew.clicked.connect(self._showNewProjectPage)
self.btnBrowse = QPushButton(self.tr("Browse"), self)
self.btnBrowse.setIcon(SHARED.theme.getIcon("browse"))
self.btnBrowse.setIcon(SHARED.theme.getIcon("browse", "yellow"))
self.btnBrowse.setIconSize(btnIconSize)
self.btnBrowse.clicked.connect(self._browseForProject)
self.btnCancel = QPushButton(self.tr("Cancel"), self)
self.btnCancel.setIcon(SHARED.theme.getIcon("cross"))
self.btnCancel.setIcon(SHARED.theme.getIcon("cancel", "red"))
self.btnCancel.setIconSize(btnIconSize)
self.btnCancel.clicked.connect(self.close)
self.btnCreate = QPushButton(self.tr("Create"), self)
self.btnCreate.setIcon(SHARED.theme.getIcon("star"))
self.btnCreate.setIcon(SHARED.theme.getIcon("star", "yellow"))
self.btnCreate.setIconSize(btnIconSize)
self.btnCreate.clicked.connect(self.tabNew.createNewProject)
self.btnOpen = QPushButton(self.tr("Open"), self)
self.btnOpen.setIcon(SHARED.theme.getIcon("open"))
self.btnOpen.setIcon(SHARED.theme.getIcon("open", "blue"))
self.btnOpen.setIconSize(btnIconSize)
self.btnOpen.clicked.connect(self._openSelectedItem)
@@ -289,7 +289,7 @@ class _OpenProjectPage(QWidget):
# Info / Tool
self.aMissing = QAction(self)
self.aMissing.setIcon(SHARED.theme.getIcon("alert_warn"))
self.aMissing.setIcon(SHARED.theme.getIcon("alert_warn", "orange"))
self.aMissing.setToolTip(self.tr("The project path is not reachable."))
self.selectedPath = QLineEdit(self)
@@ -589,7 +589,7 @@ class _NewProjectForm(QWidget):
self.projFill = QLineEdit(self)
self.projFill.setReadOnly(True)
self.browseFill = NIconToolButton(self, iSz, "add_document")
self.browseFill = NIconToolButton(self, iSz, "document_add", "blue")
self.fillMenu = _PopLeftDirectionMenu(self.browseFill)
@@ -598,11 +598,11 @@ class _NewProjectForm(QWidget):
self.fillBlank.triggered.connect(self._setFillBlank)
self.fillSample = self.fillMenu.addAction(self.tr("Create an example project"))
self.fillSample.setIcon(SHARED.theme.getIcon("add_document"))
self.fillSample.setIcon(SHARED.theme.getIcon("document_add", "blue"))
self.fillSample.triggered.connect(self._setFillSample)
self.fillCopy = self.fillMenu.addAction(self.tr("Copy an existing project"))
self.fillCopy.setIcon(SHARED.theme.getIcon("browse"))
self.fillCopy.setIcon(SHARED.theme.getIcon("project_copy", "green"))
self.fillCopy.triggered.connect(self._setFillCopy)
self.browseFill.setMenu(self.fillMenu)
+36 -2
View File
@@ -69,27 +69,61 @@ ICON_MAP = {
"bullet-off": "radio_button_unchecked",
"bullet-on": "radio_button_checked",
"unfold-hide": "arrow_right",
"unfold-show": "arrow_drop_down",
"add": "add",
"bookmarks": "bookmarks",
"browse": "folder_open",
"cancel": "cancel",
"checked": "select_check_box",
"chevron_down": "keyboard_arrow_down",
"chevron_left": "arrow_back_ios",
"chevron_right": "arrow_forward_ios",
"chevron_up": "keyboard_arrow_up",
"close": "close",
"copy": "content_copy",
"document_add": "note_add",
"document": "description",
"edit": "edit",
"exclude": "do_not_disturb_on",
"export": "share_windows",
"filter": "filter_alt",
"fit_height": "fit_page_height",
"fit_width": "fit_page_width",
"folder": "folder",
"item_add": "add",
"font": "font_download",
"import": "tab_move",
"language": "translate",
"lines": "reorder",
"list": "format_list_bulleted",
"manuscript": "export_notes",
"margin_bottom": "vertical_align_bottom",
"margin_left": "keyboard_tab_rtl",
"margin_right": "keyboard_tab",
"margin_top": "vertical_align_top",
"maximise": "fullscreen",
"minimise": "close_fullscreen",
"minimise": "fullscreen_exit",
"more_vertical": "more_vert",
"noncheckable": "indeterminate_check_box",
"novel_view": "book_4_spark",
"open": "open_in_new",
"outline": "table",
"panel": "dock_to_bottom",
"pin": "keep",
"project_copy": "folder_copy",
"project_view": "bookmark_manager",
"quote": "format_quote",
"refresh": "refresh",
"remove": "remove",
"revert": "settings_backup_restore",
"settings": "settings",
"star": "star",
"stats": "bar_chart",
"timer_off": "timer_off",
"timer": "timer",
"unchecked": "disabled_by_default",
"view": "visibility",
}