Make trees/search consistent again using background role setter

This commit is contained in:
Veronica Berglyd Olsen
2025-01-22 21:27:09 +01:00
parent f6edda3f97
commit 5dee5ecefe
3 changed files with 3 additions and 8 deletions
+1 -4
View File
@@ -201,6 +201,7 @@ class GuiNovelToolBar(QWidget):
iSz = SHARED.theme.baseIconSize
self.setContentsMargins(0, 0, 0, 0)
self.setBackgroundRole(QPalette.ColorRole.Base)
self.setAutoFillBackground(True)
# Novel Selector
@@ -270,10 +271,6 @@ class GuiNovelToolBar(QWidget):
self.tbRefresh.setThemeIcon("refresh", "green")
self.tbMore.setThemeIcon("more_vertical")
qPalette = self.palette()
qPalette.setBrush(QPalette.ColorRole.Window, qPalette.base())
self.setPalette(qPalette)
# StyleSheets
buttonStyle = SHARED.theme.getStyleSheet(STYLES_MIN_TOOLBUTTON)
self.tbNovel.setStyleSheet(buttonStyle)
+1 -4
View File
@@ -245,6 +245,7 @@ class GuiProjectToolBar(QWidget):
iSz = SHARED.theme.baseIconSize
self.setContentsMargins(0, 0, 0, 0)
self.setBackgroundRole(QPalette.ColorRole.Base)
self.setAutoFillBackground(True)
# Widget Label
@@ -351,10 +352,6 @@ class GuiProjectToolBar(QWidget):
def updateTheme(self) -> None:
"""Update theme elements."""
qPalette = self.palette()
qPalette.setBrush(QPalette.ColorRole.Window, qPalette.base())
self.setPalette(qPalette)
buttonStyle = SHARED.theme.getStyleSheet(STYLES_MIN_TOOLBUTTON)
self.tbQuick.setStyleSheet(buttonStyle)
self.tbMoveU.setStyleSheet(buttonStyle)
+1
View File
@@ -71,6 +71,7 @@ class GuiProjectSearch(QWidget):
self._blocked = False
self._map: dict[str, tuple[int, float]] = {}
self.setContentsMargins(0, 0, 0, 0)
self.setBackgroundRole(QPalette.ColorRole.Base)
self.setAutoFillBackground(True)