Bug 449096

Summary: System Settings should emit org.freedesktop.portal.Settings.SettingChanged when switching color schemes
Product: [Applications] systemsettings Reporter: Eduardo Flores <edfloreshz>
Component: kcm_colorsAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: jpwhiting, kde, mwoehlke.floss, nate, nicolas.fella, qydwhotmail
Priority: NOR    
Version First Reported In: 5.23.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.24
Sentry Crash Report:

Description Eduardo Flores 2022-01-24 20:27:56 UTC
SUMMARY

System Settings is not emitting `org.freedesktop.portal.Settings.SettingChanged` when switching to Breeze Light.

STEPS TO REPRODUCE
1. Open QDBusViewer and connect to `org.freedesktop.portal.Settings.SettingChanged`.
2. Switch to either Breeze Dark or Breeze (Breeze Classic), you should see a signal being emitted.
3. Switch to Breeze Light.

OBSERVED RESULT

Changing color scheme to Breeze Light doesn't emit `org.freedesktop.portal.Settings.SettingChanged` signal.

EXPECTED RESULT

Settings should emit a signal to `org.freedesktop.portal.Settings.SettingChanged`  when switching to Breeze Light. Some apps are unable to determine which theme to apply because of this.

ie. Telegram Desktop.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Arch Linux kernel 5.16.2
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2022-01-24 21:44:23 UTC
This signal is supposed to be emitted when changing the *color scheme*, not the *Plasma theme*. The Plasma theme applies only to Plasma itself, so it would not be appropriate for it to notify apps of any changes.

Can you confirm whether you are trying to change the color scheme, the Plasma theme, or the Global theme?
Comment 2 Eduardo Flores 2022-01-25 00:56:59 UTC
(In reply to Nate Graham from comment #1)
> This signal is supposed to be emitted when changing the *color scheme*, not
> the *Plasma theme*. The Plasma theme applies only to Plasma itself, so it
> would not be appropriate for it to notify apps of any changes.
> 
> Can you confirm whether you are trying to change the color scheme, the
> Plasma theme, or the Global theme?

Yes, I'm talking about the color scheme, not the plasma theme.
Comment 3 Nate Graham 2022-01-25 17:59:36 UTC
Thanks. Can confirm that.
Comment 4 Nicolas Fella 2022-12-17 20:06:37 UTC
As far as I can tell we do that already:

dbus-monitor interface="org.freedesktop.portal.Settings": 

signal time=1671307403.854036 sender=:1.15 -> destination=(null destination) serial=3182 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.portal.Settings; member=SettingChanged
   string "org.freedesktop.appearance"
   string "color-scheme"
   variant       uint32 2

What's missing or wrong there?
Comment 5 Nicolas Fella 2022-12-17 20:08:32 UTC
> KDE Plasma Version: 5.23.5

Support for org.freedesktop.appearance was added in Plasma 5.24
Comment 6 Nate Graham 2022-12-17 20:30:17 UTC
Boom! Thanks for following up, Nico.