-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with themes (e.g. qdarkstyle) #58
Comments
I do encounter the same problem. When I tried to use the qdarkstyle with qrangeslider which has two handles, one of the handle disappear. |
But I guess this is more about an issue related to the qdarkstyle? |
After some test, I believe this is not a problem of qdarkstyle, this might be a bug of setting style in _generic_range_slider.py |
Thanks, yes the range slider does rely on a few internal styles (though, I would have expected it to affect mostly the inner bar color, not the handles themselves, unless qdarkstyle is overriding the handle as well?) I'm aware we need to make qrangeslider a bit more robust to custom styles (see also https://github.com/napari/superqt/issues/35) but I'm afraid I don't have the bandwidth to dig deeper in to this at the moment. Any help debugging would be greatly appreciated here! |
After checking the style.qss file in qdarkstyle. I found that this can be solved by adding the following to the qrangeslider QSS style, this will be consistent with the Light plate in qdarkstyle. You can change the qproperty-barColor so that it has a consistent color with the dark theme:
|
thanks @kevinjohncutler ... good find. pixel precise styles with arbitrary style sheets is definitely a challenge! for what it's worth, i think the key bit of label-positioning code on the superqt side is probable right here: I don't have time to play with it at the moment, but if you're so inclined, i think I'd probably start tweaking there. |
Describe the bug
Using global stylesheets (such as qdarkstyle) breaks the QRangeSlider visualization.
To Reproduce
Steps to reproduce the behavior:
Used the example stylesheet for QLabeledRangeSlider and then set the qdarkstyle style sheet to the MainWindow.
This is my style sheet for the slider:
This is how I set the qdarkstyle theme:
Screenshots
Without qdarkstyle (I've customized the barColor with a gradient):
With qdarkstyle:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: