Yin-Yang icon indicating copy to clipboard operation
Yin-Yang copied to clipboard

KDE: "Light theme" to "Dark Theme" is more effective than changing Global Theme Breeze-Light to Breeze-dark

Open samsong opened this issue 4 years ago • 7 comments

Kubuntu 21.10 KDE 5.23.0

In system settings, appearance "Quick settings" change "Light" to "Dark" = update all windows & chrome, firefox

But use Yin-Yang (or also just system settings manually) If change Global Theme: Breeze to Breeze Dark

Chrome, Firefox do not update. I read they use GTK theme.

So seems that in KDE system settings pressing Light or Dark changes more options of the theme. But I couldn't find which options to change manually to do this in system settings.

I only could see pressing light/dark button makes this global change effective. Can you add support in Yin-Yang for KDE Plasma "Light" / "Dark" activation?

Seems to be a higher level than just settings the KDE theme.

samsong avatar Oct 17 '21 22:10 samsong

I tried and, at least on my system (Wayland) it didn't change the theme in Firefox nor Chromium. However, I know that changing the global theme sometimes updates the theme in Firefox, even while using Yin & Yang. However, it is definitely not reliable and rather rare. Maybe that's what happened when you tried it.

Do the quick settings change the theme in Firefox and Chromium reliably for you?

l0drex avatar Oct 18 '21 00:10 l0drex

If you have virtualbox (oracle) recommend trying it on a Virtual machine with kubuntu to test it better as my explanations are quite long / possibly unclear

But if I understand your question right yes the quick settings on the homepage of the "kde settings" app which say "Light" or "Dark" do 100% reliably change the theme every single time.

My guess about this "light/dark" button is that (one or multiple of these): a) it changes other theme settings other than just the "global theme" which Yin-Yang is doing b) it changes the "gtk" theme settings (but i could not find where this was in the kde settings appearance submenus. I tried changing every single submenu appearance setting but nothing would trigger chrome or firefox to update theme. c) it triggers some kind of refresh of plasma desktop itself? I haven't tried rebooting the system after changing the global theme to see if this does change it but I could try this now.

Any other ideas?

samsong avatar Oct 18 '21 00:10 samsong

Just tested (c) and no changing the theme with YinYang and reboot does not update Chrome.

So it must be (a) or (b) ?

samsong avatar Oct 18 '21 00:10 samsong

I just updated my main Manjaro installation and now my GTK color theme doesn't change as well. I think this is a bug in the lookandfeeltool command line tool which Yin Yang is using, as changing the global theme from the system settings (quick settings or under look and feel | Global Design) does update the GTK theme while the lookandfeeltool does not.

I submitted a bug report to kde: https://bugs.kde.org/show_bug.cgi?id=446074

l0drex avatar Nov 25 '21 12:11 l0drex

@l0drex on my system, command lookandfeeltool -a $theme does not update some applications' theme such as firefox. It seems the command doesn't update themes completely. However, if I execute the command lookandfeeltool -a $theme twice, then everything works fine! Have a try!

choyy avatar Dec 08 '21 13:12 choyy

@choyy really good catch. Some GTK application only correctly update when executing lookandfeeltool -a twice! We will add that to the code and raise a bug report.

oskarsh avatar Dec 08 '21 18:12 oskarsh

FWIW there's a bug in kde-gtk-config which fails to update the theme when a global theme switch occurs (it's a race condition causing it to read the old theme). The solution is either to update the theme twice or force restart the corresponding background service (can be done in System Settings -> Background Services -> GNOME/GTK settings synchronization service -> Stop then Start).

ishitatsuyuki avatar Dec 22 '21 04:12 ishitatsuyuki