horst3180 / arc-theme

A flat theme with transparent elements
GNU General Public License v3.0
8.27k stars 611 forks source link

Bundle multiple GTK versions in same package #484

Open HEXcube opened 8 years ago

HEXcube commented 8 years ago

Since GTK 3.16, there can be multiple versioned theme folders. That is, there can be multiple directories named like gtk-3.20, gtk-3.18, gtk-3.16, etc instead of a single gtk-3.0 directory. For example, GTK 3.20 will search for gtk.css in the directories gtk-3.20, ...,gtk-3.14 and gtk-3.0. See the commit adding this for GTK3.16

This is very useful for updating theme packages and adding support for new GTK versions without breaking previous ones. For eg: Ubuntu 16.04LTS provides GTK3.18 'out of box'. But some users upgrade to GTK3.20 from GNOME Staging PPA. With multiple versioned themes, there won't be a breakage anymore. :relaxed:

However, there's a minor hurdle in the way: GNOME Tweak Tool 3.18 (in Ubuntu 16.04LTS and it's flavors) and Raven from current Budgie v10.2.5 can't recognize versioned themes. :flushed: See these issues: https://github.com/tista500/Adapta/issues/40 , https://github.com/tista500/Adapta/issues/27 and https://github.com/solus-project/budgie-desktop/issues/405 . But it can easily be workarounded by renaming the folder holding the lowest GTK theme version (GTK3.14 in Arc's case) as gtk-3.0 and providing versioned directories for GTK 3.16 and up. :relieved: That's how Numix, Adapta and Paper does it.

ThornedRose commented 8 years ago

This is the problem I have with Deepin desktop (on Arch). I believe that because Deepin is based on Gnome, they use various versions of GTK and I'm having the same problem as #522 but as it's Deepin, I can't update (until Deepin does).

horst3180 commented 8 years ago

I'm not against implementing that, but it won't solve the problem completely. There's still Gnome Shell which doesn't have versioned themes and I know that the wrong theme version can crash Gnome Shell. I'd rather make it obvious to the user that the theme is broken, I don't want them to use a half broken one.

So, if the user-theme extension for Gnome Shell had multi version support, I could drop all of the pkg-config stuff from the build system and everyone would be happy.

@ThornedRose I don't think that's right. I'm pretty sure you only have one version of GTK 3 installed on your system (except if you're using something like xdg-app or jhbuild). So a multiversion theme wouldn't solve this. It's more likely that Deepin depends on older versions of mutter or other Gnome components.

HEXcube commented 8 years ago

There's still Gnome Shell which doesn't have versioned themes and I know that the wrong theme version can crash Gnome Shell.

@horst3180 Is it possible make the same shell theme to be compatible across 2 or 3 Gnome Shell versions? :confused: If so an upgrade across one or two versions'd manage to work without breaking anything. :relaxed:

Aside from the Gnome Shell issue, multiple versioned GTK theme'd be a good improvement coz it'll work great on other GNOME based desktops like Unity 7, Budgie, Pantheon, Cinnamon, etc :smiley:

horst3180 commented 8 years ago

Sometimes it's possible to use the same Gnome Shell theme across versions. For example the Arc Gnome Shell 3.18 theme works with 3.20.

I think there's a misunderstanding. Multiversion support has nothing to do with support for different desktop environments. This theme already works with all the DE's you listed. Every distro I know of uses only one GTK 3 version at a time.

HEXcube commented 8 years ago

I think there's a misunderstanding. Multiversion support has nothing to do with support for different desktop environments. This theme already works with all the DE's you listed. Every distro I know of uses only one GTK 3 version at a time.

Yeah, that's the normal case. But, there are users who upgrade to higher GNOME versions from PPAs. For eg, consider the case of Ubuntu 16.04LTS which has GNOME 3.18 in the repos. But, GNOME 3.20 is available via GNOME Team PPA. So, users adding the PPA'll get upgraded to GNOME 3.20. However, themes from repos and PPAs targeting Ubuntu 16.04LTS (xenial) will still be for GNOME 3.18 and may break. :worried:

I know this is a corner case, but lots of users face this problem during GNOME upgrade or sometimes during Ubuntu release upgrade too. Implementing multiple folder versions can ensure a smooth transition for them. :relaxed:

EvaSDK commented 7 years ago

Isn't this a duplicate of #436 ?

HEXcube commented 7 years ago

Isn't this a duplicate of #436 ?

@EvaSDK #436 is a pull request, while this is an issue. But yeah, both are about fixing the same problem. Next time, before I create issues, I'll search on pull requests too :grin:

Anyway, thanx @EvaSDK . I'll go comment on the pull request too