Skip to content
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

Qt6ct darker theme is partially broken and hard to read #18

Open
rado84-github opened this issue Sep 7, 2022 · 6 comments
Open

Qt6ct darker theme is partially broken and hard to read #18

rado84-github opened this issue Sep 7, 2022 · 6 comments

Comments

@rado84-github
Copy link

When you run qt6ct and choose "darker" theme and then run any application that uses qt6, part of the texts are black. Which on a dark background is very hard to read, nearly impossible (depending on the app) and eye-straining:

Picture_created_07-09-2022_20-19-59

This particular screenshot is from mkvtoolnix-gui but the same problem occurs with other applications as well, such as qbittorrent. The regular qbittorrrent uses qt6, so until this problem is resolved, I had to switch to qbittorrent-qt5. But mkvtoolnix-gui doesn't have a qt5 build, so fixing the reported problem would be much appreciated.

For comparison - there are no black texts in "darker" theme when the app is using qt5.

@ZechariahB
Copy link

ZechariahB commented Nov 28, 2022

This seems familiar. I get black icons using the system theme setting on OBS Studio (and the system theme setting defaults to Fusion rather than user picked theme). It uses Qt 6 as well. Maybe there some kind of relation?
Scratch that possibly? qgnomeplatform likes to meddle with colors.
Screenshot from 2022-11-28 01-17-58

@rado84-github
Copy link
Author

This seems familiar. I get black icons using the system theme setting on OBS Studio (and the system theme setting defaults to Fusion rather than user picked theme). It uses Qt 6 as well. Maybe there some kind of relation? Scratch that possibly? qgnomeplatform likes to meddle with colors.

Icons are easily fixable by the user. Download (if you don't have it, ofc) the same icons theme you're using for the system but make sure the name includes "dark" (like "breeze-dark", for instance), then go to ~/.local/share/icons and create a directory with the program name in it. Unpack the downloaded icons theme there and run OBS to see if it will change. If it doesn't, find the program's config file and edit it to include the new icons theme.

I can't give you details on what exactly to write in the config file bc I did that long ago and I simply can't remember the details.

Texts, however, can't be fixed that way and it depends on the qt6ct developer.

@BatchDrake
Copy link

Hi,

I am having the same issue over here. With qt5ct things used to work. In case it is helpful, this is from a custom widget I had to code and exhibits the same issue:

Screenshot from 2022-12-31 01-06-24

The color of the ticks and text of that time slider is obtained programmatically from the current palette as this->palette().color(QPalette::WindowText);. Maybe qt6ct is failing to adjust the setting for QPalette::WindowText somehow?

Cheers

@BatchDrake
Copy link

BatchDrake commented Dec 31, 2022

Okay, after playing around with qt6ctplatformtheme.cpp I found a workaround and also a rather suspicious behavior.

It turns out that pure white (#ffffffff) is a color that Qt does not like. However: an imperceptibly darker tone of white (#fffefefe) works seamlessly. I changed the files darker.conf and dusk.conf respectively as follows:

[ColorScheme]
active_colors=#fffefefe, #ff424245, #ff979797, #ff5e5c5b, #ff302f2e, #ff4a4947, #fffefefe, #fffefefe, #fffefefe, #ff3d3d3d, #ff222020, #ffe7e4e0, #ff12608a, #fff9f9f9, #ff0986d3, #ffa70b06, #ff5c5b5a, #fffefefe, #ff3f3f36, #fffefefe, #80ffffff
disabled_colors=#ff808080, #ff424245, #ff979797, #ff5e5c5b, #ff302f2e, #ff4a4947, #ff808080, #fffefefe, #ff808080, #ff3d3d3d, #ff222020, #ffe7e4e0, #ff12608a, #ff808080, #ff0986d3, #ffa70b06, #ff5c5b5a, #fffefefe, #ff3f3f36, #fffefefe, #80ffffff
inactive_colors=#fffefefe, #ff424245, #ff979797, #ff5e5c5b, #ff302f2e, #ff4a4947, #fffefefe, #fffefefe, #fffefefe, #ff3d3d3d, #ff222020, #ffe7e4e0, #ff12608a, #fff9f9f9, #ff0986d3, #ffa70b06, #ff5c5b5a, #fffefefe, #ff3f3f36, #fffefefe, #80ffffff
[ColorScheme]
active_colors=#ff000000, #ff7f7f7f, #fffefefe, #ffcbc7c4, #ff7f7f7f, #ffb8b5b2, #ff000000, #fffefefe, #ff000000, #ff7f7f7f, #ff7f7f7f, #ff707070, #ff308cc6, #fffefefe, #ff0000ff, #ffff00ff, #ff7f7f7f, #ff000000, #ff7f7f7f, #ff000000, #80000000
disabled_colors=#ffbebebe, #ff7f7f7f, #fffefefe, #ffcbc7c4, #ff7f7f7f, #ffb8b5b2, #ffbebebe, #fffefefe, #ffbebebe, #ff7f7f7f, #ff7f7f7f, #ffb1aeab, #ff7f7f7f, #fffefefe, #ff0000ff, #ffff00ff, #ff7f7f7f, #ff000000, #ff7f7f7f, #ff000000, #80000000
inactive_colors=#ff000000, #ff7f7f7f, #fffefefe, #ffcbc7c4, #ff7f7f7f, #ffb8b5b2, #ff000000, #fffefefe, #ff000000, #ff7f7f7f, #ff7f7f7f, #ff707070, #ff308cc6, #fffefefe, #ff0000ff, #ffff00ff, #ff7f7f7f, #ff000000, #ff7f7f7f, #ff000000, #80000000

My bet is that the color representation #ffffffff is encoded as 0xffffffff at some point (which equals to -1 if treated as 32-bit int), and since this value is often used as some generic invalid / unset / sentinel valued, it is silently ignored. Nonetheless, this does not look much as a qt6ct issue but a Qt6 one. This is what my widget looks like now (and the comboboxes as well):

Screenshot from 2022-12-31 01-48-39

@trialuser02
Copy link
Owner

Unfortunately, I'm unable to reproduce this issue under latest Manjaro update (qt6ct + Fusion style + darker color scheme). See screenshot. Please, give me right direction.

Screenshot_20230212_183603

@rado84-github
Copy link
Author

Well, IDK how or who fixed it but it has been fixed for a few months already. MKVToolnixGUI uses Qt6 and now it looks fine - the same way as it looks like on your end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants