[FEATURE] GTK Theme sync in v5
Submission checklist
- [x] I have searched existing issues and confirmed this has not been requested before.
- [x] I have checked existing pull requests for similar changes.
Feature type
UI / visual improvement
Feature summary
v4 had a mechanism to automatically sync the theme to GTK: https://github.com/noctalia-dev/noctalia/blob/5a92a82d06de26f433025dff5de9c18ee9d75b91/Services/Theming/ColorSchemeService.qml https://github.com/noctalia-dev/noctalia/blob/5a92a82d06de26f433025dff5de9c18ee9d75b91/Scripts/python/src/theming/gtk-refresh.py
This was synced:
- On application startup
- When the theme is switched
It would be nice to have such features with v5.
Motivation / use case
- Avoid having to configure a theme change hook
- Ease the migration from v4
Proposed solution
Migration of the feature from v4
Alternatives considered
Setting up a theme hook.
References / related projects
No response
Additional context
No response
Doesn't the built-in GTK theme template do this?
@spasche we did indeed try that in v4 however quickly disabled it since it was causing flashing for lots of people due to the fact that the we need to switch the gsettings color-scheme from current to light/dark or vice versa, this caused browsers to flash and other applications too. Which is not acceptable
Hi @Ly-sec, Thanks for the explanation. To clarify, you mean that you enabled that feature in v5 and later disabled it? Because it seems to be still available on the latest v4 (4.7.7-3):
I also notice some flashing in apps when the theme switches. But I use the automated switch, so it happens only once a day which is fine for me.
Anyway, since the apply.sh is shipped, the configuration for v5 is quite simple.
[hooks]
theme_mode_changed = "/usr/share/noctalia/assets/templates/gtk/apply.sh --appearance-only $NOCTALIA_THEME_MODE"
Indeed, we're still not sure if we'll bring that toggle back given it causes quite a lot of flickering issues, while some people don't mind, it feels a bit odd shipping something that behaves like this. What we could do, is add it to our docs though, I will add a small section about it in a minute or two. Closing this one as completed, we might bring back that toggle at some point but for now it wont be added.