Shared UI Themes

Michał Sawicz michal.sawicz at canonical.com
Thu Mar 16 10:34:40 UTC 2017


Hi all,

One of the interfaces we listed as things to be done to support UI
applications proper was UI themes.

Albert had a stab [1] at approaching this, but I'd like to discuss what
we want here long-term, how flexible we want this to be.

Right now the approach he's taken was to have a single snap
(ubuntu-app-themes) that content-shares our preferred themes, and have
the desktop helpers look there unconditionally.

While this works, it feels like it'd be quite limiting, so we thought we
discuss this in a wider forum.

Ideally, I think, we should have per-toolkit, versioned, theme
interfaces (gtk3-theme, qt5-theme). Can this be achieved with properties
of the content interface?

One problem with that is that approach is we wouldn't have a way to
change the theme globally, for all snaps, unless we change the
connections when the user selects a different theme.

Question is, how do we tell apps which theme to use or where to find it?
If a user connects a particular snap to a different theme, how do we
tell the snapped app to use it? I'm thinking interface hooks here, the
plugging snap would have to store some environment variables on
connection. Alternatively, a launch helper could check the connected
slot and modify the environment based on that?

Each theme could then be snapped separately (we could also have bundles
of themes - say, matching themes for multiple toolkits, or a group of
themes from the same source?).

On Ubuntu, we'd auto-connect our themes, other platforms would likely
want to auto-connect some others?

[1] https://github.com/ubuntu/snapcraft-desktop-helpers/pull/30

Cheers,
-- 
Michał Sawicz <michal.sawicz at canonical.com>
Canonical Ltd.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20170316/96849d5c/attachment.sig>


More information about the Snapcraft mailing list