qt6ct
qt6ct copied to clipboard
Qt6ct darker theme is partially broken and hard to read
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:
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.
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.
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.
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:
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
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):
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.
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.