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.
This commit is contained in:
parent
24146d49db
commit
32f67cb57c
@ -1809,28 +1809,6 @@ def run() -> None:
|
|||||||
# Use Fusion style so QSS has full control over rendering
|
# Use Fusion style so QSS has full control over rendering
|
||||||
app.setStyle("Fusion")
|
app.setStyle("Fusion")
|
||||||
css_text = custom_css.read_text()
|
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)
|
app.setStyleSheet(css_text)
|
||||||
# Extract selection color from QSS and apply to palette
|
# Extract selection color from QSS and apply to palette
|
||||||
import re
|
import re
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user