Fix updating syntax colours (#1171)
This commit is contained in:
@@ -130,6 +130,7 @@ class GuiTheme:
|
||||
|
||||
self.updateFont()
|
||||
self.updateTheme()
|
||||
self.updateSyntax()
|
||||
|
||||
# Icon Functions
|
||||
self.getIcon = self.iconCache.getIcon
|
||||
@@ -221,12 +222,6 @@ class GuiTheme:
|
||||
self.loadTheme()
|
||||
self.iconCache.updateTheme()
|
||||
|
||||
self.syntaxFile = self._availSyntax.get(self.guiSyntax, None)
|
||||
if self.syntaxFile is None:
|
||||
logger.error("Could not find syntax theme '%s'", self.guiSyntax)
|
||||
else:
|
||||
self.loadSyntax()
|
||||
|
||||
# Update dependant colours
|
||||
backCol = qApp.palette().window().color()
|
||||
textCol = qApp.palette().windowText().color()
|
||||
@@ -243,6 +238,19 @@ class GuiTheme:
|
||||
|
||||
return True
|
||||
|
||||
def updateSyntax(self):
|
||||
"""Update the syntac theme from theme files.
|
||||
"""
|
||||
self.guiSyntax = self.mainConf.guiSyntax
|
||||
|
||||
self.syntaxFile = self._availSyntax.get(self.guiSyntax, None)
|
||||
if self.syntaxFile is None:
|
||||
logger.error("Could not find syntax theme '%s'", self.guiSyntax)
|
||||
else:
|
||||
self.loadSyntax()
|
||||
|
||||
return True
|
||||
|
||||
def loadTheme(self):
|
||||
"""Load the currently specified GUI theme.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user