catppuccin / kde

🌻 Soothing pastel theme for KDE
MIT License
383 stars 21 forks source link

qt6 compatibility (reverts to light theme when dark is selected) #37

Closed jeois closed 1 year ago

jeois commented 1 year ago

Thanks for the cool theme and porting it to KDE. Although the AUR versions don't install the Window Decorations (aurorae) correctly, the install script here is easy to use and works well. (The SDDM themes also require additional manual installation too, but those are unrelated issues.) In any case, everything mostly looks great.

However, I've noticed qt6 programs use a default light theme rather than whichever dark theme (frappe, macchiato, mocha) that I apply. I don't know what's wrong with my configuration, so I tried using Kvantum catppuccin, but it doesn't work as well as Lightly for Application Style. For example, highlighted text in sidebars such as Dolphin file explorer are the wrong color and difficult to read until you click twice. I also tried kvantum-qt6, but I think that project already merged with the stable version of Kvantum.

I was able to change the qt6 theme with qt6ct, but exporting the environment variable causes issues with KDE (font sizes, cursors, window borders, etc.) I rather not force it for all QT apps since everything else, all the regular KDE apps and qt5 programs, already look great. It's only a few qt6 apps which don't conform.

Then, I checked previous global KDE themes I've used: breeze-dark, qogir-dark, ant-dracula; and they don't have this issue. I don't think it's Lightly's widgets causing this because any other dark color scheme besides catppuccin's works with them. So based on process of elimination, I think the Color Scheme is bugged or incompatible with qt6, but I'm not sure and don't know how to configure it.

Any ideas on how to get this theme to apply to qt6?

Sourcastic commented 1 year ago

I think I've identified the problem. Hex codes in the .color files don't work with Qt6 for some reason, and it has to be RGB. We'll make the change soon to fix it. Thanks for making the issue!

jeois commented 1 year ago

I tried your RGB commits from the dev branch, and it seems to work for the 2 Qt6 apps tested so far. Thanks for the quick fix.
Should I close the issue now or wait until the merge?

Sourcastic commented 1 year ago

Ay, nice. We'll wait until the merge, I think. (As changing to rgb breaks the splash screen, and we need to try and fix that first)

jeois commented 1 year ago

Good idea, because I just noticed something else:

When I set my Custom accent color override, everything looked fine, but when I went back to accents "from current scheme," Qt6 apps started looking funny. Most of the colors are still correct, but the highlight background and bar colors revert to bright blue instead of your lavender (catppucin-frappe-lavender).

I'm trying to find that blue in KColorSchemeEditor, but I don't think it's in there. It looks awfully similar to Breeze's light blue accent though. For now, I set the Custom accent override to the same color as the theme's highlight color. I'm testing with qBittorrent and qmmp (simple UI plugin), btw.

jeois commented 1 year ago

And yes, I didn't see the splash broke because the install script didn't replace the older one. Nice job catching that.

It's weird that it's either Hex or RGB when they could have accepted both or just stuck with one.

Sourcastic commented 1 year ago

Hmm, you're right about the accent colour issue. I think it's probably because there's no Breeze theme for Qt 6, and/or other theming stuff isn't working or available yet. Either way, I don't think it's within the scope of the colour-scheme. At least, that's what I'm gathering at the moment....

As for the splash screen, yeah. That's SVG and QML, which has its own standards that we have to account for, unfortunately.

jeois commented 1 year ago

Understood, thanks for the explanations.

The phantom blue accent color issue does seem to be limited to my copy of catppuccin frappe lavender though. For example, when I pick dracula-purple from ant-dracula-kde, the selection background and bars (volume, seek, completion) colors are purple as you would expect in Qt6 apps. The same is true for Kvantum and gray. Breeze Dark is of course blue, which is where I think that phantom color is coming from... perhaps it's defaulting to Breeze somehow.

It's not a big deal because we can override with custom accents, but there does seem to be a trick to getting a scheme's highlights to display in Qt6.

Cequallium commented 1 year ago

We discussed this over on discord and this is likely an issue with the accent colors still being hex codes, Will PR to dev by the end of this week.

Cequallium commented 1 year ago

I've made the commit to my fork on the dev branch, It needs testing. Here it is

Cequallium commented 1 year ago

I find it slightly amusing that all this happened when we transitioned to the install script when we started to use hex codes and now we're moving back to rgb.

jeois commented 1 year ago

Thanks for working on this.

I'm trying your PR. The phantom accent color issue seems to be fixed. But, I'm still having trouble launching the splash screen. Here are some errors thrown by the script, but I don't think it's related:

rm: cannot remove '/home/jeois/.local/share/plasma/desktoptheme//lightly-plasma-git/widgets/tabbar.svgz': No such file or directory
cp: cannot stat '/home/jeois/.local/share/plasma/desktoptheme//metadata.desktop': No such file or directory

Edit: I just read your note saying fixing splash is still incomplete, sorry. Anyway, the accents work without custom overrides now. Thanks again.

Cequallium commented 1 year ago

Those errors are because its trying to patch lightly plasma but its already patched, I should add a check for that.

as for the splash screen i have no idea what's causing it and am gonna need to look into it.

jeois commented 1 year ago

The script already had notice saying errors that won't affect the installation may appear. It was my fault for misreading the notes from your PR.

Sourtastic said splash broke was because we switched back to RGB. SVG and QML using Hex or RGB respectively or vice versa, I'm not sure... I'll look into it too.

You can mix the splash from main branch with everything else from dev and your PR. For instance, I didn't notice the splash was broken since the install script didn't replace the older splash. I'll rebuild main and step through the diff.

Cequallium commented 1 year ago

i found it, it was 2 missing double quotes

jeois commented 1 year ago

Awesome. As far as I can tell, the splash screen is fixed thanks to your latest commit.

Now I'm noticing Latte Modern's window buttons aren't being captured by my panel widget, but that's a separate issue and nothing to worry about since many users probably don't use them this way. I only use the dark schemes (macchiato, frappe, mocha); so it doesn't really affect me either.

I think you two just made this theme Qt6 compatible. Congrats

jeois commented 1 year ago

Ignore what I said about window buttons. Logging out fixed it for Latte and Mocha Modern. Everything's looking good; thanks again.

Sourcastic commented 1 year ago

Just tested the changes, it all seems to be working and Qt6 apps are properly themed again! I'll close the issue once the PR is completed and merged into main. Thanks @Cequallium!

Sourcastic commented 1 year ago

The fixes have been merged into main now, so this issue can be closed now. Thanks for raising it!

jeois commented 1 year ago

now I'm having issues with cursors in GTK, lol.

If I install them from catppuccin/cursors it's fine, but when the script installs them to .local/share/icons somehow it doesn't work for GTK apps.

I probably screwed up GTK or X config somehow. I guess I'll create another issue if I can't figure it out, haha.

jeois commented 1 year ago

I used a workaround by setting XCURSOR_PATH environment variable.
export XCURSOR_PATH=${XCURSOR_PATH}:~/.local/share/icons It's strange this path isn't already one of the defaults. In any case, I don't think it's related to this kde theme. Sorry for the false alarm.

Sourcastic commented 1 year ago

Yup, np.

Cequallium commented 1 year ago

I recommend ln -s ~/.local/share/icons/ ~/.icons as this is a problem with pretty much any legacy app that only looks in ~/.icons

I dont want to autorun this in the script because I feel it's a bit too much for a theme install script to write to ~/

jeois commented 1 year ago

Ah, I forgot about ~/.icons Thanks for the tip. With that link, it works without limiting the path to only ./local/share/icons like the env variable.

Now if SDDM could just find the cursors too, hah... oh well.

Cequallium commented 1 year ago

there is an option in the kde settings to configure sddm, just click the option "apply plasma settings"

jeois commented 1 year ago

yeah, I tried that. It's still giving me default cursors. I also looked at /etc/sddm.conf and the files in /etc/sddm.conf.d

For what it's worth, I was already having an issue with CursorSize=, which seems to do nothing (had to use XCURSOR_SIZE env variable, which makes it jump in size every time), but cursor themes in /usr/share/icons do work. For example, the AUR PKGBUILD script that installs them there works.

jeois commented 1 year ago

I asked sddm about cursor theme paths.
It sorta makes sense since the human user hasn't logged in yet, so it has to be system-wide or the "sddm user"