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:
committed by
GitHub
parent
be3376272e
commit
15ec1496c5
@@ -36,6 +36,8 @@ from PyQt5.QtWidgets import (
|
||||
QTextBrowser, QLabel
|
||||
)
|
||||
|
||||
from novelwriter.common import readTextFile
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -230,10 +232,9 @@ class GuiAbout(QDialog):
|
||||
"""Load the content for the Release Notes page.
|
||||
"""
|
||||
docPath = os.path.join(self.mainConf.assetPath, "text", "release_notes.htm")
|
||||
if os.path.isfile(docPath):
|
||||
with open(docPath, mode="r", encoding="utf-8") as inFile:
|
||||
helpText = inFile.read()
|
||||
self.pageNotes.setHtml(helpText)
|
||||
docText = readTextFile(docPath)
|
||||
if docText:
|
||||
self.pageNotes.setHtml(docText)
|
||||
else:
|
||||
self.pageNotes.setHtml("Error loading release notes text ...")
|
||||
return
|
||||
@@ -242,10 +243,9 @@ class GuiAbout(QDialog):
|
||||
"""Load the content for the Licence page.
|
||||
"""
|
||||
docPath = os.path.join(self.mainConf.assetPath, "text", "gplv3_en.htm")
|
||||
if os.path.isfile(docPath):
|
||||
with open(docPath, mode="r", encoding="utf-8") as inFile:
|
||||
helpText = inFile.read()
|
||||
self.pageLicense.setHtml(helpText)
|
||||
docText = readTextFile(docPath)
|
||||
if docText:
|
||||
self.pageLicense.setHtml(docText)
|
||||
else:
|
||||
self.pageLicense.setHtml("Error loading licence text ...")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user