Palette no longer needs to be a class variable in headers and footers

This commit is contained in:
Veronica K. B. Olsen
2020-10-25 11:18:02 +01:00
parent 5edee1be0b
commit a07bfec433
2 changed files with 29 additions and 29 deletions
+14 -14
View File
@@ -2158,13 +2158,13 @@ class GuiDocEditHeader(QWidget):
"""Update the colours of the widget to match those of the syntax """Update the colours of the widget to match those of the syntax
theme rather than the main GUI. theme rather than the main GUI.
""" """
self.thePalette = QPalette() thePalette = QPalette()
self.thePalette.setColor(QPalette.Window, QColor(*self.theTheme.colBack)) thePalette.setColor(QPalette.Window, QColor(*self.theTheme.colBack))
self.thePalette.setColor(QPalette.WindowText, QColor(*self.theTheme.colText)) thePalette.setColor(QPalette.WindowText, QColor(*self.theTheme.colText))
self.thePalette.setColor(QPalette.Text, QColor(*self.theTheme.colText)) thePalette.setColor(QPalette.Text, QColor(*self.theTheme.colText))
self.setPalette(self.thePalette) self.setPalette(thePalette)
self.theTitle.setPalette(self.thePalette) self.theTitle.setPalette(thePalette)
return return
@@ -2368,15 +2368,15 @@ class GuiDocEditFooter(QWidget):
"""Update the colours of the widget to match those of the syntax """Update the colours of the widget to match those of the syntax
theme rather than the main GUI. theme rather than the main GUI.
""" """
self.thePalette = QPalette() thePalette = QPalette()
self.thePalette.setColor(QPalette.Window, QColor(*self.theTheme.colBack)) thePalette.setColor(QPalette.Window, QColor(*self.theTheme.colBack))
self.thePalette.setColor(QPalette.WindowText, QColor(*self.theTheme.colText)) thePalette.setColor(QPalette.WindowText, QColor(*self.theTheme.colText))
self.thePalette.setColor(QPalette.Text, QColor(*self.theTheme.colText)) thePalette.setColor(QPalette.Text, QColor(*self.theTheme.colText))
self.setPalette(self.thePalette) self.setPalette(thePalette)
self.statusText.setPalette(self.thePalette) self.statusText.setPalette(thePalette)
self.linesText.setPalette(self.thePalette) self.linesText.setPalette(thePalette)
self.wordsText.setPalette(self.thePalette) self.wordsText.setPalette(thePalette)
return return
+15 -15
View File
@@ -801,13 +801,13 @@ class GuiDocViewHeader(QWidget):
"""Update the colours of the widget to match those of the syntax """Update the colours of the widget to match those of the syntax
theme rather than the main GUI. theme rather than the main GUI.
""" """
self.thePalette = QPalette() thePalette = QPalette()
self.thePalette.setColor(QPalette.Window, QColor(*self.theTheme.colBack)) thePalette.setColor(QPalette.Window, QColor(*self.theTheme.colBack))
self.thePalette.setColor(QPalette.WindowText, QColor(*self.theTheme.colText)) thePalette.setColor(QPalette.WindowText, QColor(*self.theTheme.colText))
self.thePalette.setColor(QPalette.Text, QColor(*self.theTheme.colText)) thePalette.setColor(QPalette.Text, QColor(*self.theTheme.colText))
self.setPalette(self.thePalette) self.setPalette(thePalette)
self.theTitle.setPalette(self.thePalette) self.theTitle.setPalette(thePalette)
return return
@@ -1051,16 +1051,16 @@ class GuiDocViewFooter(QWidget):
"""Update the colours of the widget to match those of the syntax """Update the colours of the widget to match those of the syntax
theme rather than the main GUI. theme rather than the main GUI.
""" """
self.thePalette = QPalette() thePalette = QPalette()
self.thePalette.setColor(QPalette.Window, QColor(*self.theTheme.colBack)) thePalette.setColor(QPalette.Window, QColor(*self.theTheme.colBack))
self.thePalette.setColor(QPalette.WindowText, QColor(*self.theTheme.colText)) thePalette.setColor(QPalette.WindowText, QColor(*self.theTheme.colText))
self.thePalette.setColor(QPalette.Text, QColor(*self.theTheme.colText)) thePalette.setColor(QPalette.Text, QColor(*self.theTheme.colText))
self.setPalette(self.thePalette) self.setPalette(thePalette)
self.lblRefs.setPalette(self.thePalette) self.lblRefs.setPalette(thePalette)
self.lblSticky.setPalette(self.thePalette) self.lblSticky.setPalette(thePalette)
self.lblComments.setPalette(self.thePalette) self.lblComments.setPalette(thePalette)
self.lblSynopsis.setPalette(self.thePalette) self.lblSynopsis.setPalette(thePalette)
return return