Use the system gtk theme


Yes, there’s work in progress towards transparent themed application support.


Thanks for your time!
What do you mean by Transparent Themed Application support?


The end goal of the on going work is that when someone installs a snap that supports themeing, the application will run with the right theme for the local system transparently, without any need for manual user actions.


Interesting, how it will work for QT apps in Gtk Environment? or Gtk apps in QT Environment?


The details are still being worked out, but the basic idea is that themes will be packed in snaps, and the correct snap will be selected based on the theme name. So it will be possible to select the proper theme even in those cases, where there’s a cross over between a desktop based on one toolkit is running an application from a different toolkit.


So any more detail about this, This is the only thing that hold me back from using snap apps! Alien Cursor with Theme.


@zyga is landing some changes to snapd which will unblock the theme work fixes which are being work on by @jamesh. This post has some more details: Layouts: re-mapping snap directories


We just had a call to sync up on the progress of this work. Here are the details:


Thanks for the status update. When Snap support for themes comes out, will all existing Snap packages get the improvement automatically, or will I have to repackage Polarr so that it will respect the user’s system theme? If I have to repackage, is this the thread I should be following so I’ll get notified when it’s time to rebuild the Snap?


Any News on GTK and QT Theme Support? Its the major reason why i don’t use snap often :frowning:


Justification on asking for news:

Layouts landed in 2.32 (10th April) according to the snapd roadmap, I think the ‘improvements happening in the content interface’ is referring to ‘Auto install of content snap dependencies’? That latter feature also landed in 2.32. I’m sure I’ve seen some work on the forum for application themes but I don’t remember where and it should be linked to in this topic! :slight_smile:


all the snaps below use the wrong theme

Name                  Version    Rev
gnome-calculator      3.28.1     178
gnome-characters      3.28.2     101
gnome-logs            3.28.2     37
gnome-system-monitor  3.26.0     45

snap version

snap    2.32.9+18.04
snapd   2.32.9+18.04
series  16
ubuntu  18.04
kernel  4.15.0-23-generic

core version and revision

core    16-2.32.8  4650


Hi, I would like to know if there was some way to fix this as today ? Thanks


So, some time has passed now, and I’d still like to release a snap of Pick, especially since there have been new Ubuntu releases which I haven’t turned on the PPA for, but I’m still stymied at the same point: that I don’t want to release a version which doesn’t look like all the rest of my apps. So, is there now a way of shipping a Gtk app in a snap which will use the system theme, whatever that system theme is? (I don’t know if this is a @kenvandine question, or someone else; hi Ken if so :-))


Yes, this will work for themes that are bundled in gtk-common-themes but not arbitrary themes found on the internet yet. Please see the documentation and let me know if you have any questions.


I do, specifically “why doesn’t it work for me” :slight_smile:

My snapcraft.yaml is (and the whole project is there if you want to pull it and try building). When run, it doesn’t use the theme of my other windows, but some light-coloured theme with different window decorations. What might I need to do to make this work?


Your snap is using gtk-common-themes properly, whoever gtk-common-themes doesn’t contain the MATE themes yet. @Wimpress is working on that still. Your app is properly themed on disco for me.


aha! Thank you @kenvandine – confirmation there is great. And now I know who to pursue next :slight_smile:


A simple way to check whether the GTK side is working is to run your app with the GTK_THEME environment variable, and see whether it conforms to the named theme. For example:

GTK_THEME=Breeze pick-colour-picker

You can see the list of GTK themes currently in the package by checking /snap/gtk-common-themes/current/share/themes/. We do plan to add some more common themes, but the end goal is to allow themes to be packaged independently. We’ve set up gtk-common-themes to make this possible, but currently snapd won’t auto-connect additional theme snaps to application snaps.


And Pick is solely a snap now; much love to @popey, @kenvandine, and @jamesh for all the help on this! Go forth and choose colours and get cool names for them. :slight_smile: