Clean up warnings and deprecations in gui components

This commit is contained in:
Veronica Berglyd Olsen
2025-01-13 02:21:56 +01:00
parent a60e0b3c87
commit 5027b8df19
14 changed files with 458 additions and 474 deletions
+3 -8
View File
@@ -544,31 +544,26 @@ class GuiTheme:
"""Build default style sheets."""
self._styleSheets = {}
aPx = CONFIG.pxInt(2)
bPx = CONFIG.pxInt(4)
cPx = CONFIG.pxInt(6)
dPx = CONFIG.pxInt(8)
tCol = palette.text().color()
hCol = palette.highlight().color()
# Flat Tab Widget and Tab Bar:
self._styleSheets[STYLES_FLAT_TABS] = (
"QTabWidget::pane {border: 0;} "
f"QTabWidget QTabBar::tab {{border: 0; padding: {bPx}px {dPx}px;}} "
"QTabWidget QTabBar::tab {border: 0; padding: 4px 8px;} "
f"QTabWidget QTabBar::tab:selected {{color: {cssCol(hCol)};}} "
)
# Minimal Tool Button
self._styleSheets[STYLES_MIN_TOOLBUTTON] = (
f"QToolButton {{padding: {aPx}px; margin: 0; border: none; background: transparent;}} "
"QToolButton {padding: 2px; margin: 0; border: none; background: transparent;} "
f"QToolButton:hover {{border: none; background: {cssCol(tCol, 48)};}} "
"QToolButton::menu-indicator {image: none;} "
)
# Big Tool Button
self._styleSheets[STYLES_BIG_TOOLBUTTON] = (
f"QToolButton {{padding: {cPx}px; margin: 0; border: none; background: transparent;}} "
"QToolButton {padding: 6px; margin: 0; border: none; background: transparent;} "
f"QToolButton:hover {{border: none; background: {cssCol(tCol, 48)};}} "
"QToolButton::menu-indicator {image: none;} "
)