diff options
| author | srdusr <[email protected]> | 2026-07-17 21:56:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2026-07-17 21:56:00 +0200 |
| commit | 5611194ef57cd766223a01932cffa2969a81a983 (patch) | |
| tree | 8371b9f95c32938cc659aaad40497db036685f27 /crates/wayland/src/state/mod.rs | |
| parent | a1f1135ec7054a5aaec545c24d4d95b45d8d8d75 (diff) | |
| download | srdwm-5611194ef57cd766223a01932cffa2969a81a983.tar.gz srdwm-5611194ef57cd766223a01932cffa2969a81a983.zip | |
Write every GTK button style into the stylesheet, all but one commented out
The generated file used to hold only the configured style, so it answered
"what am I set to" and nothing else. There was no way to see what the other
setting looked like without changing the config and restarting, and no way
to read the rules in order to borrow from them.
Now every style in GTK_BUTTON_STYLES is written out on each generation. The
configured one is live; the rest sit below it inside block comments, each
labelled with the button_style value that turns it on. The file becomes the
menu of what the setting can be, and a place to read or copy real rules
from, without any of them applying.
The header says plainly that editing this file does nothing, because it is
rewritten on every start and every config reload, and points at the two
places an edit does survive: button_style in the srdwm config for a whole
style, and gtk.css for anything no style covers, since the user's own rules
come after the @import and therefore win.
A style body containing "*/" would end the comment that hides it early and
leave two styles live at once, so a test asserts no body can. The other
tests strip every comment and check that the configured style, and only the
configured style, survives - which is what a GTK parser would see.
Generated the file through this code path and installed it for GTK 3 and
GTK 4; backups are at ~/.config/gtk-{3,4}.0/srdwm-buttons.css.bak-20260829-013445.
Diffstat (limited to 'crates/wayland/src/state/mod.rs')
0 files changed, 0 insertions, 0 deletions