BreezeStyleSheets icon indicating copy to clipboard operation
BreezeStyleSheets copied to clipboard

Checkbox not shown in dark mode

Open jeangagne555 opened this issue 2 years ago • 16 comments

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)

image

image

jeangagne555 avatar Mar 30 '22 23:03 jeangagne555

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

Example Checkbox

Alexhuszagh avatar Apr 26 '22 14:04 Alexhuszagh

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. 2022-04-26 09_37_09-Window

Alexhuszagh avatar Apr 26 '22 14:04 Alexhuszagh

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

Screenshot_20220426_112214

Light Style

Screenshot_20220426_112230

Native Style

Screenshot_20220426_112244

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.

Alexhuszagh avatar Apr 26 '22 16:04 Alexhuszagh

As soon as I have the time I will try to recreate the issue with a simple example application.

jeangagne555 avatar May 18 '22 18:05 jeangagne555

Any progress on this?

Alexhuszagh avatar Sep 02 '22 12:09 Alexhuszagh

If you can create a reproducible test case, I'll be glad to reopen this issue.

Alexhuszagh avatar Nov 18 '22 23:11 Alexhuszagh

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.

starseeker avatar Dec 07 '22 03:12 starseeker

I'll re-open this then, which Ubuntu version are you currently using so I can create a reproducible test case in a VM?

Alexhuszagh avatar Dec 07 '22 04:12 Alexhuszagh

Version 22.10 (https://ubuntu.com/download/desktop) - Installed Qt6 with sudo apt install qt6-base-dev

starseeker avatar Dec 07 '22 04:12 starseeker

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.

starseeker avatar Dec 07 '22 04:12 starseeker

For the most stark difference, the upper right corner usually looks something like this: image

starseeker avatar Dec 07 '22 04:12 starseeker

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.): image

starseeker avatar Dec 07 '22 04:12 starseeker

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.)

starseeker avatar Dec 07 '22 04:12 starseeker

There we go - looks like it is something about Ubuntu's version. Building 6.4.2 Qt from source, I'm getting this:
image

starseeker avatar Dec 07 '22 05:12 starseeker

Just curious - were you able to reproduce the issue with the Ubuntu Qt?

starseeker avatar May 01 '23 18:05 starseeker

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?

starseeker avatar Aug 26 '23 22:08 starseeker