lah7 / Ambiant-MATE

Ambiant-MATE and Radiant-MATE family of themes and icons
Other
26 stars 7 forks source link

Support for GTK 4 applications #3

Open lah7 opened 2 years ago

lah7 commented 2 years ago

Personally I don't use any GTK 4 applications, but some users might, especially in the next few years as more GTK 3 software may begin migrating to GTK 4.

For now, it might be possible to symlink gtk-3.0 with gtk-4.0 if the CSS/theming engines are similar.

Also originally requested at https://github.com/ubuntu-mate/ubuntu-mate-artwork/issues/72

OmegaRogue commented 1 year ago

gtk4 apps seem to no really like that, here are some interesting results

image

lah7 commented 9 months ago

A user recently got in touch querying about GTK 4 support, since Ubuntu 24.04 may start shipping apps built with GTK 4. Here are my thoughts:

From what I understand, whether a GTK 4 application can be themed depends on the application's code. If the developer chooses to use the libadwaita library, then I believe Adwaita (default: light or dark) is used as the theme/styling becomes baked into the application.

Apps using libadwaita suggest an intention to follow the GNOME Human Interface Guidelines (Adwaita design language). They'll look out of place outside of GNOME, like MATE. Those apps can't be themed unless the library or program code is modified. Ubuntu do patch libadwaita-1-0 to support Yaru's accent colours, maybe if it's the case that Yaru can be used in place of Adwaita?

It should be possible to see if an app uses libadwaita like so:

ldd $(which gnome-disks) | grep libadwaita
ldd $(which transmission-gtk) | grep libadwaita

Yaru and Adwaita look quite similar. Yaru actually derives their changes on top of GNOME's Adwaita.

Regular GTK 4 applications (not using libadwaita) should still be themeable as they do today with GTK 3. Since GNOME/GTK discourage this kind of theming, there is still a risk of breakage whenever GTK 4 is updated.

Thinking about it, I don't think it's worth the hassle to support GTK 4. 🚫

It would require someone to be fully committed and willing to do the ongoing maintenance for years to come to ensure GTK 4 changes doesn't break on users who use this theme. I can't commit to that - nor do I enjoy theming 🙅🏻‍♂️ - I'm sticking around to coordinate fixes and the packaging side of things.[1]

Any one who's an avid fan of this theme, I'd recommend sticking with Ubuntu MATE 20.04 (or 22.04) until their Ubuntu support ends in 2025 (or 2027) - these will have GTK 3 applications.

Any theme developers who's keen to port to GTK 4, you're welcome to take on the challenge!