Skip to content

theme: Search in versioned directories

Iain Lane requested to merge theme-search-version into master

We support third party themes, via the "stylesheetName" property of a mode's json files. However, our external CSS API is not completely stable. If a third party theme wants to work on multiple gnome-shell versions - for example because it is shipped as a Flatpak or a Snap - it is not possible to ensure that a theme corresponding to the running gnome-shell version is loaded.

GTK+ loads themes from versioned directories, search backwards from the current version. Let's do the same in gnome-shell too. Then a downstream theme can be shipped in $datadir/gnome-shell/3.28/theme/.

We keep searching all of the current paths. Additionally, the default case where we look for the 'gnome' theme as a resource in the binary continues to be the default so there are no additional lookups for users of this theme.

Merge request reports