Remove theme key from theme colours list
This commit is contained in:
@@ -447,7 +447,6 @@ class nwLabels:
|
|||||||
"Custom": (-1.0, -1.0),
|
"Custom": (-1.0, -1.0),
|
||||||
}
|
}
|
||||||
THEME_COLORS: Final[dict[str, str]] = {
|
THEME_COLORS: Final[dict[str, str]] = {
|
||||||
"theme": QT_TRANSLATE_NOOP("Constant", "Theme Colours"),
|
|
||||||
"default": QT_TRANSLATE_NOOP("Constant", "Foreground Colour"),
|
"default": QT_TRANSLATE_NOOP("Constant", "Foreground Colour"),
|
||||||
"base": QT_TRANSLATE_NOOP("Constant", "Background Colour"),
|
"base": QT_TRANSLATE_NOOP("Constant", "Background Colour"),
|
||||||
"faded": QT_TRANSLATE_NOOP("Constant", "Faded Colour"),
|
"faded": QT_TRANSLATE_NOOP("Constant", "Faded Colour"),
|
||||||
|
|||||||
@@ -294,6 +294,7 @@ class GuiPreferences(NDialog):
|
|||||||
# Tree Icon Colours
|
# Tree Icon Colours
|
||||||
self.iconColTree = NComboBox(self)
|
self.iconColTree = NComboBox(self)
|
||||||
self.iconColTree.setMinimumWidth(200)
|
self.iconColTree.setMinimumWidth(200)
|
||||||
|
self.iconColTree.addItem(self.tr("Theme Colours"), DEF_TREECOL)
|
||||||
for key, label in nwLabels.THEME_COLORS.items():
|
for key, label in nwLabels.THEME_COLORS.items():
|
||||||
self.iconColTree.addItem(trConst(label), key)
|
self.iconColTree.addItem(trConst(label), key)
|
||||||
self.iconColTree.setCurrentData(CONFIG.iconColTree, DEF_TREECOL)
|
self.iconColTree.setCurrentData(CONFIG.iconColTree, DEF_TREECOL)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ from PyQt6.QtGui import QAction, QFont, QFontDatabase, QKeyEvent
|
|||||||
from PyQt6.QtWidgets import QFileDialog, QFontDialog
|
from PyQt6.QtWidgets import QFileDialog, QFontDialog
|
||||||
|
|
||||||
from novelwriter import CONFIG, SHARED
|
from novelwriter import CONFIG, SHARED
|
||||||
from novelwriter.config import DEF_GUI_DARK, DEF_GUI_LIGHT
|
from novelwriter.config import DEF_GUI_DARK, DEF_GUI_LIGHT, DEF_TREECOL
|
||||||
from novelwriter.constants import nwUnicode
|
from novelwriter.constants import nwUnicode
|
||||||
from novelwriter.dialogs.preferences import GuiPreferences
|
from novelwriter.dialogs.preferences import GuiPreferences
|
||||||
from novelwriter.dialogs.quotes import GuiQuoteSelect
|
from novelwriter.dialogs.quotes import GuiQuoteSelect
|
||||||
@@ -198,7 +198,7 @@ def testDlgPreferences_Settings(qtbot, monkeypatch, nwGUI, fncPath, tstPaths):
|
|||||||
prefs.iconColDocs.setChecked(True)
|
prefs.iconColDocs.setChecked(True)
|
||||||
prefs.emphLabels.setChecked(True)
|
prefs.emphLabels.setChecked(True)
|
||||||
|
|
||||||
assert CONFIG.iconColTree == "theme"
|
assert CONFIG.iconColTree == DEF_TREECOL
|
||||||
assert CONFIG.iconColDocs is False
|
assert CONFIG.iconColDocs is False
|
||||||
assert CONFIG.emphLabels is False
|
assert CONFIG.emphLabels is False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user