From 32f67cb57c19d2b6da148a2faf88240fd6df9521 Mon Sep 17 00:00:00 2001 From: pax Date: Sun, 5 Apr 2026 05:28:52 -0500 Subject: [PATCH] Remove injected spinbox fix, add spinbox styling to bundled themes Each theme now has its own QSpinBox button styling matching its color scheme. No more injected CSS hacks. --- booru_viewer/gui/app.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/booru_viewer/gui/app.py b/booru_viewer/gui/app.py index fb93fc5..6f504e1 100644 --- a/booru_viewer/gui/app.py +++ b/booru_viewer/gui/app.py @@ -1809,28 +1809,6 @@ def run() -> None: # Use Fusion style so QSS has full control over rendering app.setStyle("Fusion") css_text = custom_css.read_text() - # Inject spinbox arrow fix if not already styled - if "QSpinBox::up-button" not in css_text: - css_text += """ - QSpinBox::up-button, QSpinBox::down-button { - width: 16px; - border: none; - } - QSpinBox::up-arrow { - image: none; - border-left: 4px solid transparent; - border-right: 4px solid transparent; - border-bottom: 5px solid palette(text); - width: 0; height: 0; - } - QSpinBox::down-arrow { - image: none; - border-left: 4px solid transparent; - border-right: 4px solid transparent; - border-top: 5px solid palette(text); - width: 0; height: 0; - } - """ app.setStyleSheet(css_text) # Extract selection color from QSS and apply to palette import re