Move a bunch of settings to a new tab in main settings using the new config layout

This commit is contained in:
Veronica K. B. Olsen
2020-05-03 16:56:03 +02:00
parent bf9e365d25
commit 3d0cd5a71c
2 changed files with 200 additions and 126 deletions
+17
View File
@@ -68,6 +68,7 @@ class GuiTheme:
self.statNone = [120,120,120]
self.statUnsaved = [120,120, 40]
self.statSaved = [ 40,120, 0]
self.helpText = [ 0, 0, 0]
# Loaded Syntax Settings
@@ -121,6 +122,8 @@ class GuiTheme:
##
def updateTheme(self):
"""Update the GUI theme from theme files.
"""
self.guiTheme = self.mainConf.guiTheme
self.guiSyntax = self.mainConf.guiSyntax
@@ -135,6 +138,20 @@ class GuiTheme:
self.loadTheme()
self.loadSyntax()
# Update dependant colours
backCol = qApp.palette().window().color()
textCol = qApp.palette().windowText().color()
backLCol = backCol.lightnessF()
textLCol = textCol.lightnessF()
if backLCol > textLCol:
helpLCol = textLCol + 0.65*(backLCol - textLCol)
else:
helpLCol = backLCol + 0.65*(textLCol - backLCol)
self.helpText = [int(255*helpLCol)]*3
return True
def loadTheme(self):