Drop grey icon themes (#869)
* Add settings translator for icon themes * Rename `typicons_colour_*` to `typicons_*` * Delete grey icon themes * Delete outdated paragraph in main README * Fix tests
This commit is contained in:
committed by
GitHub
parent
3403d98c72
commit
1fb9648c6c
@@ -1,8 +1,8 @@
|
||||
[Main]
|
||||
timestamp = 2021-08-17 20:59:39
|
||||
timestamp = 2021-08-26 17:48:02
|
||||
theme = default
|
||||
syntax = default_light
|
||||
icons = typicons_colour_light
|
||||
icons = typicons_light
|
||||
guidark = False
|
||||
guifont =
|
||||
guifontsize = 11
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[Main]
|
||||
timestamp = 2021-08-17 20:59:42
|
||||
timestamp = 2021-08-26 17:48:04
|
||||
theme = default
|
||||
syntax = default_light
|
||||
icons = typicons_colour_light
|
||||
icons = typicons_light
|
||||
guidark = True
|
||||
guifont = Sans
|
||||
guifontsize = 12
|
||||
@@ -13,7 +13,7 @@ hidehscroll = True
|
||||
|
||||
[Sizes]
|
||||
geometry = 1200, 650
|
||||
preferences = 700, 615
|
||||
preferences = 670, 589
|
||||
treecols = 200, 50, 30
|
||||
novelcols = 200, 50
|
||||
projcols = 200, 60, 140
|
||||
|
||||
@@ -126,8 +126,8 @@ def testBaseConfig_Init(monkeypatch, tmpDir, fncDir, outDir, refDir, filesDir):
|
||||
|
||||
# Test load/save with no path
|
||||
tstConf.confPath = None
|
||||
assert not tstConf.loadConfig()
|
||||
assert not tstConf.saveConfig()
|
||||
assert tstConf.loadConfig() is False
|
||||
assert tstConf.saveConfig() is False
|
||||
|
||||
# Run again and set the paths directly and correctly
|
||||
# This should create a config file as well
|
||||
@@ -174,8 +174,8 @@ def testBaseConfig_Init(monkeypatch, tmpDir, fncDir, outDir, refDir, filesDir):
|
||||
assert tstConf.appRoot == os.path.dirname(appRoot)
|
||||
assert tstConf.appPath == os.path.dirname(appRoot)
|
||||
|
||||
assert tstConf.loadConfig()
|
||||
assert tstConf.saveConfig()
|
||||
assert tstConf.loadConfig() is True
|
||||
assert tstConf.saveConfig() is True
|
||||
|
||||
# Test Correcting Quote Settings
|
||||
origDbl = tstConf.fmtDoubleQuotes
|
||||
@@ -187,16 +187,42 @@ def testBaseConfig_Init(monkeypatch, tmpDir, fncDir, outDir, refDir, filesDir):
|
||||
tstConf.fmtSingleQuotes = ["'", "'"]
|
||||
tstConf.doReplaceDQuote = True
|
||||
tstConf.doReplaceSQuote = True
|
||||
assert tstConf.saveConfig()
|
||||
assert tstConf.saveConfig() is True
|
||||
|
||||
assert tstConf.loadConfig()
|
||||
assert not tstConf.doReplaceDQuote
|
||||
assert not tstConf.doReplaceSQuote
|
||||
assert tstConf.loadConfig() is True
|
||||
assert tstConf.doReplaceDQuote is False
|
||||
assert tstConf.doReplaceSQuote is False
|
||||
|
||||
tstConf.fmtDoubleQuotes = origDbl
|
||||
tstConf.fmtSingleQuotes = origSng
|
||||
tstConf.doReplaceDQuote = orDoDbl
|
||||
tstConf.doReplaceSQuote = orDoSng
|
||||
assert tstConf.saveConfig() is True
|
||||
|
||||
# Test Correcting icon theme
|
||||
origIcons = tstConf.guiIcons
|
||||
|
||||
tstConf.guiIcons = "typicons_colour_dark"
|
||||
assert tstConf.saveConfig() is True
|
||||
assert tstConf.loadConfig() is True
|
||||
assert tstConf.guiIcons == "typicons_dark"
|
||||
|
||||
tstConf.guiIcons = "typicons_grey_dark"
|
||||
assert tstConf.saveConfig() is True
|
||||
assert tstConf.loadConfig() is True
|
||||
assert tstConf.guiIcons == "typicons_dark"
|
||||
|
||||
tstConf.guiIcons = "typicons_colour_light"
|
||||
assert tstConf.saveConfig() is True
|
||||
assert tstConf.loadConfig() is True
|
||||
assert tstConf.guiIcons == "typicons_light"
|
||||
|
||||
tstConf.guiIcons = "typicons_grey_light"
|
||||
assert tstConf.saveConfig() is True
|
||||
assert tstConf.loadConfig() is True
|
||||
assert tstConf.guiIcons == "typicons_light"
|
||||
|
||||
tstConf.guiIcons = origIcons
|
||||
assert tstConf.saveConfig()
|
||||
|
||||
# Localisation
|
||||
|
||||
@@ -72,7 +72,7 @@ def testGuiTheme_Main(qtbot, monkeypatch, nwMinimal, tmpDir):
|
||||
|
||||
assert novelwriter.CONFIG.guiTheme == "default_dark"
|
||||
assert novelwriter.CONFIG.guiSyntax == "tomorrow_night_eighties"
|
||||
assert novelwriter.CONFIG.guiIcons == "typicons_colour_dark"
|
||||
assert novelwriter.CONFIG.guiIcons == "typicons_dark"
|
||||
assert novelwriter.CONFIG.guiDark is True
|
||||
assert novelwriter.CONFIG.guiFont == "Cantarell"
|
||||
assert novelwriter.CONFIG.guiFontSize == 11
|
||||
@@ -120,7 +120,7 @@ def testGuiTheme_Main(qtbot, monkeypatch, nwMinimal, tmpDir):
|
||||
theIcons = nwGUI.theTheme.theIcons
|
||||
novelwriter.CONFIG.guiIcons = "invalid"
|
||||
assert not theIcons.updateTheme()
|
||||
novelwriter.CONFIG.guiIcons = "typicons_colour_dark"
|
||||
novelwriter.CONFIG.guiIcons = "typicons_dark"
|
||||
assert theIcons.updateTheme()
|
||||
|
||||
# Ask for a non-existent key
|
||||
|
||||
Reference in New Issue
Block a user