Use only GTK Module for managing window decorations CSS
Now we are no longer use gtk.css file inside ~/.config/gtk-3.0/ directory for window decorations. To load decorations into GTK apps we now exclusively use GTK module.
The module is a GTK-app addon, that loads the buttons on application startup, then it reacts to changes of windows_decorations.css file in config directory and loads and unloads it dynamically depending on its presence.
For example: file is present - it is loaded on the startup, file is deleted - it is unloaded, file is created or changed - it is loaded, while the past version of it is unloaded.
File presence is controlled by kde-gtk-config kded5 module.
🧪 Test Plan
This test plan is based on the one found in !2 (merged)
Before doing any of these tests:
- Restart kded5 (once).
- Apply new kconf_update script.
To open a GTK 3 application with the loaded module:
export GTK_PATH="~/kde/usr/lib/gtk-3.0/"
gedit
1. Main functionality
- Open Window Decorations KCM
- Open the GTK application with CSD
- Change window decorations
- GTK app should use the new decorations from the KCM
2. Change on colors' change
- Set window decorations to Breeze
- Open Colors KCM
- Open the GTK app
- Change color scheme
- Decorations must be using new colors
3. Change on Breeze decoration's "circle" setting change
- Set window decorations to Breeze
- Open Breeze window decoration settings
- Open the GTK app
- Change the setting "Draw a circle around close button"
- Decoration now should respect the above setting
4. Change on GTK theme change
- Set GTK theme to Breeze
- Open the GTK app
- Change window decorations, decorations should change
- Set GTK theme in Application Style KCM to something other (Pick some random GTK theme)
- Decorations should be from that GTK theme
- Change window decorations, decorations should not change
5. Initial loading
After changing the decorations:
- Close the GTK app
- Open the GTK app
- Decorations should be in place
6. Bugs related test
From the bug report:
- Set the window decorations to something vivid
- Do not open GTK app yet.
- Open GTK page, set GTK theme to Breeze.
- Open GTK app.
- At this moment change the GTK theme in settings
- Now the decorations are
brokenfine!.