Update and reorganise themes (#893)

* Drop the subfolders for GUI themes
* Remove bundled font support
* Add safe file read function
* Allow loading themes from multiple locations
* Clean up unused variables
* Clean up icons class
* Merge icon theme icons
* Update icon theme class
* Remove guiDark config setting
* Fix tests
* Fix handling of default theme
* Update icon readmes
* Add test for getGuiItem common function
This commit is contained in:
Veronica Berglyd Olsen
2021-09-19 14:09:20 +02:00
committed by GitHub
parent be3376272e
commit 15ec1496c5
201 changed files with 482 additions and 2043 deletions
+6 -7
View File
@@ -84,11 +84,6 @@ def testDlgPreferences_Main(qtbot, monkeypatch, fncDir, outDir, refDir):
tabGeneral = nwPrefs.tabGeneral
nwPrefs._tabBox.setCurrentWidget(tabGeneral)
qtbot.wait(keyDelay)
assert not tabGeneral.guiDark.isChecked()
qtbot.mouseClick(tabGeneral.guiDark, Qt.LeftButton)
assert tabGeneral.guiDark.isChecked()
qtbot.wait(keyDelay)
assert tabGeneral.showFullPath.isChecked()
qtbot.mouseClick(tabGeneral.showFullPath, Qt.LeftButton)
@@ -249,8 +244,12 @@ def testDlgPreferences_Main(qtbot, monkeypatch, fncDir, outDir, refDir):
testFile = os.path.join(outDir, "guiPreferences_novelwriter.conf")
compFile = os.path.join(refDir, "guiPreferences_novelwriter.conf")
copyfile(projFile, testFile)
ignoreLines = [2, 7, 9, 10, 15, 16, 17, 18, 19, 20, 21, 22, 23, 32, 33]
assert cmpFiles(testFile, compFile, ignoreLines)
ignTuple = (
"timestamp", "guifont", "lastnotes", "guilang", "geometry",
"preferences", "treecols", "novelcols", "projcols", "mainpane",
"docpane", "viewpane", "outlinepane", "textfont", "textsize"
)
assert cmpFiles(testFile, compFile, ignoreStart=ignTuple)
# Clean up
novelwriter.CONFIG = origConf