Added a theme class that loads the theme from config

This commit is contained in:
Veronica K. B. Olsen
2019-05-18 20:48:19 +02:00
parent 48da59321b
commit a2a6fd60bc
7 changed files with 156 additions and 24 deletions
+8 -6
View File
@@ -27,14 +27,16 @@ class GuiDocViewer(QTextBrowser):
# Class Variables
self.mainConf = nw.CONFIG
self.theParent = theParent
self.theTheme = theParent.theTheme
self.theDoc = self.document()
self.theDoc.setDefaultStyleSheet("""
h1, h2, h3, h4 {
color: rgb(0,155,200);
}
""")
self.theDoc.setDefaultStyleSheet((
"h1, h2, h3, h4 {{"
" color: rgb({0},{1},{2});"
"}}"
).format(
*self.theTheme.colHead
))
self.theDoc.setDocumentMargin(self.mainConf.textMargin[0])
self.setMinimumWidth(300)