Hello there folks, Since updating from 6.7.0, my colors in dolphin get completely nuked. On my desktop, text becomes blindingly white, on my laptop, deep black. Both make it quite unusable, painful to read in the former case, unreadable in the latter. They should be pulled from my qt6ct theme which makes text light gray. Other apps (e.g. kate, kwrite) don't seem to be affected, but have a different bug, in which colors are incorrectly loaded until I click settings -> app theme -> qt6ct / kvantum-dark, then they fix themselves, idk why that happens. I've compiled kiconthemes from -git (at 6.9.0) and the issue persists. Downgrading just KIconThemes to 6.7 solves the problem. If any logs, configs, etc are needed, please let me know.
> They should be pulled from my qt6ct theme I'm afraid using qt6ct is not supported, sorry. You're on your own here if you choose to use it anyway.
Ummm, what do you suggest to use then...?
The normal method of setting colors in System Settings > Colors & Themes > Color Scheme. At the moment we don't expose to the user anywhere that qt6ct is not supported, which is unfortunate. We do have documentation attesting to this though: https://community.kde.org/Distributions/Packaging_Recommendations#Packages_to_avoid And we do plan to make it visible to the user in the future: https://invent.kde.org/plasma/plasma-workspace/-/issues/64
Considering it works everywhere BUT kde apps, what would be the proper QT_QPA_PLATFORMTHEME env var to just have it in dolphin? plasma-integration?
I think so, but I'm not an expert at this kind of fine-grained customization.
Alright, thanks for the help.
You're welcome!
Hey Nate, I've pulled plasma-integration and it's still broken! I'm launching dolphin with QT_QPA_PLATFORMTHEME=plasma-integration and I can see the changes done in system settings if I switch to fusion. However, if I go to my preferred theme (kvantum-dark), on 6.7 the text is all good, but 6.8+ is blindingly white. Is that now going to be "kvantum is not supported either" or...?
Indeed we don't support Kvantum. :) It's 100% 3rd-party; we have no input into it or control over it. Since you're pretty sure the problem happened in KIconThemes 6.8, I'd recommend going over the commits for KIconThemes listed in https://kde.org/announcements/frameworks/6/6.8.0/ and undoing them one by one, or git-bisecting, if you're familiar with that. It's possible one of those changes had an unintentional effect on 3rd-party theming tools that would be harmless to fix.
Sure thing, be right back, unless something implodes. Thanks :)
I am back :) Apparently Arch's 6.8 was not truly 6.8 (idk blame arch) but I have bisected it successfully down to this: df1e75fc8a248040235ac1412e0bf6c55bff2a9f is the first bad commit commit df1e75fc8a248040235ac1412e0bf6c55bff2a9f Author: Ilya Fedin <fedin-ilja2010@ya.ru> Date: Sat Oct 19 20:15:59 2024 +0400 Postpone spawning KColorSchemeManager instance This ensures it's not getting overriden by QGuiApplication setting initial palette src/kicontheme.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
I thought that one looked suspicious as well given the symptoms, so I'm not super duper surprised. Re-opening. Ilya, any thoughts?
The commit Vaxry mentioned has actually engaged the change made by https://invent.kde.org/frameworks/kiconthemes/-/commit/8854f8aa66734338b07f86ff56d02241ef0057ee (before my commit it was overridden back with platform color scheme by QApplicationPrivate::initializeWidgetPalettesFromTheme called in QApplicationPrivate::init). I would also say that QT_QPA_PLATFORMTHEME=plasma-integration is invalid value, the right one is QT_QPA_PLATFORMTHEME=kde. And, as far as I understand, the correct way of applying dark mode outside of Plasma now is to set org.freedesktop.appearance color-scheme key via settings portal because that's what KColorSchemeWatcher looks at. I have a MR that should restore the possibility to set color scheme via kdeglobals when the portal provides no value: https://invent.kde.org/frameworks/kcolorscheme/-/merge_requests/28.
Another thing to mention is that kvantum is also at fault here. Normally, it would just be with light background. But given that kvantum force applies its palette, it gets partial coverage (as it overrides only QPalette but not KColorScheme).
More discussion about all that is at https://invent.kde.org/frameworks/kiconthemes/-/issues/3
> I'm afraid using qt6ct is not supported, sorry. You're on your own here if you choose to use it anyway. Nate, as far as I understand the person uses KDE apps outside of Plasma (the only way to trigger the code path he got) so qt6ct is likely the only way to adjust the appearance of Qt apps he can use. plasma-integration doesn't work correctly with a non-Plasma session as far as I'm aware (it uses custom tray implementation, etc).
I don't think I follow properly here. Firstly, what does dark mode have to do with anything here? It might explain why on my laptop the text is black and on my desktop white, but that's not the problem...? The problem is that it is overridden by something and does not properly adhere to what I set in kvantum. Are you implying the bug is solely on kvantum's side? If it works with everything but Plasma apps, I'd argue otherwise. Many, many people use kvantum, even in KDE (I mean, I was using kvantum back when I was on KDE too, you have an entire kvantum store page and tons of themes and rices use kv) This is not a great change I am afraid if that's the case. And yes, I am using Plasma apps outside KDE.
> Firstly, what does dark mode have to do with anything here? As a part of https://invent.kde.org/frameworks/kiconthemes/-/issues/3 movement, KDE apps now always force apply Breeze style, icon theme and color scheme. They no more follow what platform theme says. You can change icon theme and style by manually editing kdeglobbals (what systemsettings does). For color scheme, you can use only the portal setting due to the light/dark mode change. By default it uses Breeze Light color scheme. If you use a dark style, normally it will stay light anyway due to the Breeze Light color scheme. But kvantum overrides widget palette with hacks so you get partially kvantum's palette and partially Breeze Light. The only way to get out of that for you is set the portal setting to `prefer-dark` so it switches to Breeze Dark. > Are you implying the bug is solely on kvantum's side? If it works with everything but Plasma apps, I'd argue otherwise. Well, the original problem here is that KDE apps use KColorScheme instead of QPalette. Without applying a fitting KColorScheme, you get things like dark text on dark background even before all those changes. And that's why they are made: so that it doesn't happen by default at least (you get hard coded Breeze until you tinker with kdeglobals). You encounter this because you do tinkering and the way of setting color schemes has changed (you have to set via xdg-desktop-portal now). If https://invent.kde.org/frameworks/kcolorscheme/-/merge_requests/28 is merged, you will be able to use kdeglobals/systemsettings for that again when portal doesn't provide a preference. If not, you sadly have to get used to the portal way apparently...
TL;DR I propose you to try the MR and leave comment both here and in the MR that it fixes your bug. Maybe then it will get more chances to get merged.
The problem here is that no breeze theme fits my case. Light will have black text (unreadable) and dark will have a white text (too bright) > Well, the original problem here is that KDE apps use KColorScheme instead of QPalette. Without applying a fitting KColorScheme, you get things like dark text on dark background even before all those changes Okay, how do I get qt6ct / kvantum to work as a KColorScheme, or, disable KColorScheme and use QPalette regardless? It's been working forever (at least since plasma 5 days, I am not that old) and breaking this now seems like a step backwards. I've set kvantum, qt6ct, etc, in systemsettings and none made the text go to what kvantum asks the text color to be. > I propose you to try the MR and leave comment both here and in the MR that it fixes your bug Sure, I'll do that tomorrow, it's 2am here.
> Okay, how do I get qt6ct / kvantum to work as a KColorScheme, or, disable KColorScheme and use QPalette regardless? Well, you can use my qt6ct PR to set KColorScheme via it: https://github.com/trialuser02/qt6ct/pull/43. If you use Arch, you can get it via qt6ct-kde from AUR. If you use NixOS, you can get it with the module from my https://github.com/ilya-fedin/nur-repository repo (the module overrides the behavior of the NixOS's standard qt.platformTheme = "qt5ct" option), it's the nixosModules.qt6ct output of the flake.
I've pulled qt6ct-kde from the AUR and it still does not fix the issue. I'm attaching a screenshot that perfectly shows it. Text on the left is KDE-themed, text in the buttons is not. Which... suggests the MR does not even work properly as the KDE theming is not applied uniformly. So, not only is it overwriting (when IMO it should not outside of KDE) it's also not doing a good job at it.
Created attachment 175811 [details] Text color bug
> So, not only is it overwriting (when IMO it should not outside of KDE) That's what was suggested: https://invent.kde.org/frameworks/kiconthemes/-/issues/3#note_1042871 > it's also not doing a good job at it. Did you apply a KColorScheme from the list of color schemes? But what about the kcolorscheme MR though? As far as I understand you didn't try it?
> Did you apply a KColorScheme from the list of color schemes? In qt6ct? I use my own color scheme there. When set to Kvantum (KColorScheme), the main pane's colors are correct. However, side panel, path bar, details bar (bottom one, e.g. "123 folders, 420 files") all still have the wrong text colors. > But what about the kcolorscheme MR though? As far as I understand you didn't try it? Which one? https://invent.kde.org/frameworks/kcolorscheme/-/merge_requests/28 ? Nope, will build now. I assume no further configuration is needed.
Built from your branch, no change.
> In qt6ct? Yeah > When set to Kvantum (KColorScheme), the main pane's colors are correct. However, side panel, path bar, details bar (bottom one, e.g. "123 folders, 420 files") all still have the wrong text colors. That's apparently what the colors in the color scheme are? You perhaps need to find/create a fitting KColorScheme? > I assume no further configuration is needed. The only thing is there will be no change when you have a KColorScheme set in qt6ct-kde. > Built from your branch, no change. Did you have a color scheme set via system settings previously? I assumed you had like that person using LXQt but if you didn't then it won't do a change indeed.
Here's my full setup: Using my own kvantum theme. qt6ct-kde from the AUR kcolorschemes built from your MR qt6ct: - style: kvantum-dark - palette: custom, my own. Here it is: [ColorScheme] active_colors=#ffd9d9d9, #ff242121, #ff5e2721, #ff363030, #ff000000, #ff292424, #ffa6a6a6, #ffffffff, #ffa6a6a6, #ff110e0e, #ff110e0e, #ff000000, #ff242121, #ffa6a6a6, #ff5e2721, #ff443c3c, #ff1e1a1a, #ff000000, #ff000000, #ffa6a6a6, #80a6a6a6, #ff308cc6 disabled_colors=#ffd9d9d9, #ff242121, #ff5e2721, #ff363030, #ff000000, #ff292424, #ffa6a6a6, #ffffffff, #ffa6a6a6, #ff110e0e, #ff110e0e, #ff000000, #ff242121, #66a6a6a6, #ff5e2721, #ff443c3c, #ff1e1a1a, #ff000000, #ff000000, #ffa6a6a6, #80a6a6a6, #ff919191 inactive_colors=#ffd9d9d9, #ff242121, #ff5e2721, #ff363030, #ff000000, #ff292424, #ffa6a6a6, #ffffffff, #ffa6a6a6, #ff110e0e, #ff110e0e, #ff000000, #ff242121, #ffa6a6a6, #ff5e27ff, #ff443c3c, #ff1e1a1a, #ff000000, #ff000000, #ffa6a6a6, #80a6a6a6, #ff308cc6 it's worth noting text is almost pure #ffffffff (antialiasing makes it a bit tough to measure, I got #F8F9F6) which as you can see does not appear here. Text should be #ffd9d9d9. I've also done some experimenting and it seems that SOME of the KColorSchemes I get listed change the broken text colors (e.g. Sweet-Mars) but most don't (e.g. Gently, Dracula, kvantum)
Oh, another note: KColorScheme options break various other apps. Nheko's theming (qt6/qml) is completely broken. PCManFM-qt (qt6): same. Hyprsysteminfo (qt6/qml): text colors become wrong.
> Here's my full setup: Do I understand right you had no color scheme set via systemsettings/kdeglobals? > Oh, another note: KColorScheme options break various other apps. Nheko's theming (qt6/qml) is completely broken. PCManFM-qt (qt6): same. Hyprsysteminfo (qt6/qml): text colors become wrong. Perhaps because they don't fit your theme? Given that you have created your own one...
> Perhaps because they don't fit your theme? Given that you have created your own one... Nope, setting it to kvantum (KColorScheme) should pull my own kvantum theme, but half the panes in nheko are generic gray. ( > Do I understand right you had no color scheme set via systemsettings/kdeglobals? I set it once to various things back in this thread when it was suggested to set one there. Then, I uninstalled systemsettings, plasma-integration, etc, so they are no longer here. kdeglobals does have some stuff, but deleting it messes up stuff even more (icons break) while not fixing the text issue. I also tried removing all the colors in kdeglobals, nothing changed.
Wait, I think I know what's happening. "Kvantum" I think is the default kvantum theme, not the active one! In which case, the dropdown is missing stuff, like my Kvantum theme :P (Original text issue is still the problem here, if I set the palette to the one I shared before, everything BUT kde text works.)
> Nope, setting it to kvantum (KColorScheme) should pull my own kvantum theme, but half the panes in nheko are generic gray. ( idk why you think like that, it's just /usr/share/color-schemes/Kvantum.colors > I set it once to various things back in this thread when it was suggested to set one there. I mean initially you had no color scheme specified there, right? > I also tried removing all the colors in kdeglobals, nothing changed. Hm. What does `busctl --user call org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.portal.Settings ReadOne ss org.freedesktop.appearance color-scheme` return?
> I mean initially you had no color scheme specified there, right? I had some colors set by... god knows what, but no theme. I've nuked them now and nothing changed. > Hm. What does `busctl --user call org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.portal.Settings ReadOne ss org.freedesktop.appearance color-scheme` return? v u 1
That explains why nothing was changed, the kcolorscheme MR changes the code path for 0 (no preference)
Mhm, made it 0 and I can definitely see a change now: - text and icon color is very dark on any non-kcolorscheme (unreadable) - note to above: Text is dark everywhere but tab text, where text did not go dark, but icons did. - on my palette, the accent color is wrong (looks like default of some kind for kde, blueish, visible in the devices part on the side pane) Setting it to some KColorScheme, e.g. Sweet-Mars "fixes" text in dolphin (readable, passable...) but breaks all non-kde apps (mismatched mosaic of two color themes)
> I had some colors set by... god knows what, but no theme. What I try to understand is whether just following kdeglobals enough for your case or only not overriding QPalette. In the latter case it would mean you need a way to opt out of all that non-KDE logic and then perhaps it should be discussed with Christoph Cullmann whether that's something should be added.
> text and icon color is very dark on any non-kcolorscheme (unreadable) If you use kcolorscheme from my MR, it should follow the colors specified in kdeglobals. So if you right now have its content like you had initially then my MR doesn't help you, indeed.
Yeah I've removed all color-related entries from my kdeglobals. On 6.7, everything is still fine. I feel like QPalette should just not be overridden on non-KDE environments.
Ok, let's try to summarize: 1. Before 6.8 KColorSchemeManager was applying QPalette partially. This was leading to bugs with out-of-the-box experience on e.g. GNOME with dark color scheme (dark text on dark background) 2. Since 6.8. it's applied correctly and out-of-the-box experience is ok but it has broke your kdeglobals customization (kvantum style instead of breeze). 3. Pre-6.8 state is: you had Breeze (on one machine Dark but on other machine Light as far as I read from the initial message?) color scheme applied in places using KColorScheme and global QPalette but your palette set via qt6ct in the widgets from this list: https://github.com/qt/qtbase/blob/88cf96680095f003404dd7282a7a36785f6e8e14/src/widgets/kernel/qapplication.cpp#L1241-L1257. It should be a complete mess but it somehow worked for your exact setup. Personally I see three solutions: 1. You create your own KColorScheme (e.g. via systemsettings app) matching your theme and set it via qt6ct-kde 2. Add a way to opt out of the non-KDE logic to the frameworks 3. Possibility to override style gets removed from KStyleManager, Breeze gets always forced on non-KDE Thus I'm adding Christoph to decide what is the way to go. Hope I added the correct e-mail. Nate, please correct if it's the wrong one.
Yes, except in 3: on my desktop, I had a populated kdeglobals with some colors, from what I assume was my old KDE install. On my laptop, I did not. Laptop never had KDE installed. Maybe I just didn't have the "prefer dark" (1) in the portal set. To the rest, I am not well-versed in qt6 internals to make any judgements. re sol 1. I'd like to inquire on how exactly one would do that? re sol 2. you mean opt out of the non-KDE logic or the KDE logic? Here I think we just need to opt out of the KDE color scheme manager. It would make the most sense to me. Every QT app would look uniform if none of them override the QPalette except the theme engine.
> On my laptop, I did not. Laptop never had KDE installed. Maybe I just didn't have the "prefer dark" (1) in the portal set. That's exactly what I meant. Right now kcolorscheme sets Breeze Dark on "prefer dark" or Breeze Light with any other one. > re sol 1. I'd like to inquire on how exactly one would do that? You just open the "Colors" page in system settings app, click on the pencil button in any color scheme, edit it and then "Save as". Then you should be able to apply it via qt6ct-kde. That's the only way to set it right now on non-KDE but I guess it could also be discussed to add an official way. My kcolorscheme MR adds one for "no preference" on portal but it seems you use "prefer dark". For that case, I guess separate keys for light/dark scheme are needed... > re sol 2. you mean opt out of the non-KDE logic or the KDE logic? Here I think we just need to opt out of the KDE color scheme manager. It would make the most sense to me. Every QT app would look uniform if none of them override the QPalette except the theme engine. I mean to add a way to restore the pre-6.6 state, when QPalette was not overridden. But it still won't use QPalette everywhere as there are places KColorScheme class is used explicitly and that's why all that logic was added: usually pre-6.6 state was leading to things like light text on light background in places using KColorScheme while dark background everywhere else but it was somehow invisible with you customizations. Given that KColorScheme has more color roles than QPalette, QPalette couldn't be mapped to KColorScheme. Only the other way around (what is done by forcing Breeze color scheme). The problem is that kvantum then somehow overrides palette again but not in all places (perhaps because it has no control on KColorScheme framework) so you see what you see.
I guess that's what kvantum does that leads to the partial state: https://github.com/tsujan/Kvantum/blob/9e7a9a707effd45241755e3cb8286bbcaecacb19/Kvantum/style/Kvantum.cpp#L998-L1002 I tried to ask kvantum developer to at least un-do what he does when switching out of Kvantum style (not even stopping doing that at all!) a while ago but the communication was pretty... weird: https://github.com/tsujan/Kvantum/issues/1018
> I tried to ask kvantum developer to at least un-do what he does when switching out of Kvantum style (not even stopping doing that at all!) a while ago but the communication was pretty... weird I will admit the kvantum guy is... a personality. > You just open the "Colors" page in system settings app, click on the pencil button in any color scheme My color scheme is not there... where does it look and for what..? I have a kvantum theme and a qt6ct palette. I can see the ones I get from the KDE store are KDE-centric configurations. Do I just painstakingly remake the palette into a KDE-applicable .colors file? > Given that KColorScheme has more color roles than QPalette, QPalette couldn't be mapped to KColorScheme Extrapolation? Guesswork? I mean, it depends what are those added colors, but if it's just 2 more background colors, mapping would not be hard.
> My color scheme is not there... where does it look and for what..? I have a kvantum theme and a qt6ct palette. I mean choose any of them and edit it as you need it. The pencil opens a dialog with allows you to edit any color. Then you save it with new name with the "Save as" button. > Extrapolation? Guesswork? I mean, it depends what are those added colors, but if it's just 2 more background colors, mapping would not be hard. IIRC it was discussed somewhere but the discussion didn't go far enough.
> I mean choose any of them and edit it as you need it. The pencil opens a dialog with allows you to edit any color. Then you save it with new name with the "Save as" button. Yup, that worked. Thanks! Where is it saved? I want to grab that one to get it synced across my devices.
~/.local/share/color-themes iirc
Yup, got it. Thanks! Assuming that qt6ct MR gets merged, I'd say this is fixed. I had to make my own additional color scheme, but that's only because I make my themes myself, most themes from the store should work fine.
Honestly it looks like qt6ct is dead. The PR sits for half of the year without any acknowldgement from the maintainer and qt6ct had no commits for a long time...
That's not great. Maybe I can ask outfoxxed to look at it, maybe he'd like to take over it if it's truly dead. Are there any alternatives?
I guess the only alternatives are using plasma-integration or lxqt-qtplugin. I was thinking about porting my patches to lxqt-qtplugin (that's what qt6ct has derived from after all!) but given that it's maintained by the same person that maintains Kvantum, I'm not sure about that :D.
3.6k C++ lines. Sounds like a fun side project for one weekend where I have too much time. hyprqtengine. Haha. Well, thanks for the help then Ilya! At least for now, my themes are fixed. :)
Looks like found where it was discussed the previous time: https://invent.kde.org/teams/vdg/issues/-/issues/26 (and especially the mentioned https://nicolasfella.de/posts/how-platform-integration-works/ link). But looks like they decided to go with QGnomePlatform having a KColorScheme rather than deriving KColorScheme from QPalette.
I was told it's possible to specify color scheme with [UiSettings] ColorScheme=The localized name of color scheme, as it's displayed in UIs Typically it gets specified in app config file (e.g. dolpinrc) but it seem to also work with Dolphin when specified in kdeglobals from my testing. On other hand, applications having color scheme chooser in UI (e.g. Elisa) seem to write ColorScheme setting with empty value to their config file if it isn't present what shadows the value in kdeglobals. But then you can easily select your color scheme in their UI.