BreezeStyleSheets
BreezeStyleSheets copied to clipboard
Checkbox not shown in dark mode
When using the dark stylesheet, checkboxes are not displayed properly. Only the test is visible. See attached images comparing the default Qt stylesheet versus the dark stylesheet.
Qt 6.2.2 with C++ in Visual Studio 2022 with Qt Visual Studio Tools version 2.8.1 (rev.6)
Seems like the test suite in the test suite isn't catching this issue.
Going to verify on Windows (I believe it works for me on Linux with KDE), and then try to recreate your settings UI to see if I can dissect the issue. If you have time, can you try running the following command and pasting the output:
PyQt5
pyrcc5 dist/breeze.qrc -o breeze_resources.py
python3 test/ui.py --widget checkbox --stylesheet dark
PyQt6
python3 test/ui.py --widget checkbox --stylesheet dark --pyqt6
Here's the same image on Windows 10, using PyQt5, so I believe the issue is likely UI-specific. I'll try to recreate the above UI, but sample code (in C++ or PyQt) would be greatly appreciated.
I currently cannot reproduce this, so a more detailed example would be necessary to fix this issue.
Settings Code
https://github.com/Alexhuszagh/BreezeStyleSheets/blob/040d6d260fec7b59c38341ad537da488558ac7e9/test/ui.py#L948-L1058
Results
Dark Style
Light Style
Native Style
Summary
As you can see, for my limited example, all of them have the desired behavior. I even added hooks to ensure the QFontDialog
and QFileDialog
events were properly getting fired and the values stored.
As soon as I have the time I will try to recreate the issue with a simple example application.
Any progress on this?
If you can create a reproducible test case, I'll be glad to reopen this issue.
I'm seeing similar behavior, but oddly it seems to be specific to the Qt distributed with Ubuntu. I'm not able to bootstrap the Qt build yet on this new install (doesn't want to work out of the box due to some dependency issues - grr) but if I can get that going I'll try to confirm its specific to the Ubuntu packaged version.
I'll re-open this then, which Ubuntu version are you currently using so I can create a reproducible test case in a VM?
Version 22.10 (https://ubuntu.com/download/desktop) - Installed Qt6 with sudo apt install qt6-base-dev
I doubt it's useful for test cases purposes, but just so you'll know what I'm doing (and whether anything I'm doing wrong might be at issue) my application is setting the theme at startup as follows: https://github.com/BRL-CAD/brlcad/blob/main/src/qged/main.cpp#L237
I"m bundling it into the build here: https://github.com/BRL-CAD/brlcad/blob/main/src/qged/CMakeLists.txt#L65
I'm using only the dark theme, so the files in https://github.com/BRL-CAD/brlcad/tree/main/src/qged/theme are a subset.
For the most stark difference, the upper right corner usually looks something like this:
Currently I'm seeing this (number of rectangles up top isn't significant - missing icons and checkboxes is the startling bit. Scrollbar does appear with the correct color if I shrink the window enough.):
Don't know if it's related, but I've also lost the "open/closed" arrow indicators in the tree view (let me know if an image would be helpful.)
There we go - looks like it is something about Ubuntu's version. Building 6.4.2 Qt from source, I'm getting this:
Just curious - were you able to reproduce the issue with the Ubuntu Qt?
I should follow up on my above screenshots - the icons missing were due to my system not having the qtsvg package present. (I didn't realize svg was separate from the base install initially.) I'm not sure if that's also related to the checkbox drawing?