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
+15 -15
View File
@@ -801,13 +801,13 @@ class GuiDocViewHeader(QWidget):
"""Update the colours of the widget to match those of the syntax
theme rather than the main GUI.
"""
self.thePalette = QPalette()
self.thePalette.setColor(QPalette.Window, QColor(*self.theTheme.colBack))
self.thePalette.setColor(QPalette.WindowText, QColor(*self.theTheme.colText))
self.thePalette.setColor(QPalette.Text, QColor(*self.theTheme.colText))
thePalette = QPalette()
thePalette.setColor(QPalette.Window, QColor(*self.theTheme.colBack))
thePalette.setColor(QPalette.WindowText, QColor(*self.theTheme.colText))
thePalette.setColor(QPalette.Text, QColor(*self.theTheme.colText))
self.setPalette(self.thePalette)
self.theTitle.setPalette(self.thePalette)
self.setPalette(thePalette)
self.theTitle.setPalette(thePalette)
return
@@ -1051,16 +1051,16 @@ class GuiDocViewFooter(QWidget):
"""Update the colours of the widget to match those of the syntax
theme rather than the main GUI.
"""
self.thePalette = QPalette()
self.thePalette.setColor(QPalette.Window, QColor(*self.theTheme.colBack))
self.thePalette.setColor(QPalette.WindowText, QColor(*self.theTheme.colText))
self.thePalette.setColor(QPalette.Text, QColor(*self.theTheme.colText))
thePalette = QPalette()
thePalette.setColor(QPalette.Window, QColor(*self.theTheme.colBack))
thePalette.setColor(QPalette.WindowText, QColor(*self.theTheme.colText))
thePalette.setColor(QPalette.Text, QColor(*self.theTheme.colText))
self.setPalette(self.thePalette)
self.lblRefs.setPalette(self.thePalette)
self.lblSticky.setPalette(self.thePalette)
self.lblComments.setPalette(self.thePalette)
self.lblSynopsis.setPalette(self.thePalette)
self.setPalette(thePalette)
self.lblRefs.setPalette(thePalette)
self.lblSticky.setPalette(thePalette)
self.lblComments.setPalette(thePalette)
self.lblSynopsis.setPalette(thePalette)
return