gtk-theme-framework
gtk-theme-framework copied to clipboard
gtk4/gnome40 support
Hi, thanks for sharing this framework, its wonderful.
Since the gnome40 update some applications have oversized headerbars - gnome system monitor, gnome-weather are just a couple I have noticed. Vimix has resolved these issues. Would it be possible to pull in these changes from vimix?
Thanks for your time!
I am unsure how relevant this is to gtk-theme-framework, but this is the commit that added gnome-40 support for vimix.
Hi @vredesbyyrd, sorry I completely missed your initial issue when it was raised, I've been considering what to do with Gnome40 but atm I haven't got a distro set up to run it.
Thanks for the pointer with the commit, I shall take a look and see what can be done :)
Hi @vredesbyyrd, sorry for taking so long on this, I've finally had a change to switch a few machines over to gnome 42 (debian testing) and have had a play with the new state of gtk4 / libadwaita. I'm not 100% sure how effective the theming tool is going to be moving forward. I have kind of replicated some of the functionality offered by this project with:
~/.config/gtk-4.0/gtk.css
windowcontrols .close {
background-image: url("./titlebuttons-dark/titlebutton-close.svg");
}
windowcontrols .close:hover {
background-image: url("./titlebuttons-dark/titlebutton-close-hover.svg");
}
windowcontrols .maximize {
background-image: url("./titlebuttons-dark/titlebutton-maximize.svg");
}
windowcontrols .maximize:hover {
background-image: url("./titlebuttons-dark/titlebutton-maximize-hover.svg");
}
windowcontrols .minimize {
background-image: url("./titlebuttons-dark/titlebutton-minimize.svg");
}
windowcontrols .minimize:hover {
background-image: url("./titlebuttons-dark/titlebutton-minimize-hover.svg");
}
windowcontrols .close,
windowcontrols .maximize,
windowcontrols .minimize {
background-position: 50% 50%;
background-repeat: no-repeat;
color: transparent;
padding: 0;
}
@define-color accent_color @green_4;
@define-color accent_bg_color @green_4;
@define-color window_bg_color #070D1B;
@define-color window_fg_color white;
@define-color headerbar_bg_color #1E3652;
@define-color headerbar_fg_color white;
@define-color popover_bg_color #434C5E;
@define-color popover_fg_color white;
@define-color view_bg_color #070D1B;
@define-color view_fg_color white;
@define-color card_bg_color rgba(255, 255, 255, 0);
@define-color card_fg_color white;
Then modifying the gtk-3.0 theme provided by this package
~/.themes/[THEME_NAME]/gtk-3.0/gtk.css
1995,1996c1995,1996
< border-top-left-radius: 2px;
< border-top-right-radius: 2px;
---
> border-top-left-radius: 14px;
> border-top-right-radius: 14px;
And finally fully importing the gnome shell theme from: https://gitlab.gnome.org/GNOME/gnome-shell-sass and https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/data/theme/gnome-shell.scss
Modifying the _colors.scss file and then recompiling with sassc.
After putting that all together, it kinda works...

Some applications (e.g. nautilus) seem to be stuck between libadwaita & gtk-3 and seem to just default to the built-in gtk-3 theme, even when other (e.g. chrome) work fine using the existing gtk-3 themes.
Attempting to launch apps while forcing the theme (i.e. GTK_THEME=spacx nautilus) can kinda work:

But it feels like a really awkward and horrible solution.
I think when more apps pick up libadwaita it'll be easier to provide "custom overides" via the scripting in this package, i.e. the gtk-4 method above, but at the moment with apps being half ported half not it's hard to find one nice solution to all the different issues.
On a personal note, the above patches are working nicely for me, the only app i use often that annoys me is nautilus, but hopefully soon it'll be updated to libadwaita and then it'll match everything else.
I hope some of this is useful to you, if you have any thoughts or suggestions then it'd be awesome to hear :)