[snap] GTK theme doesn't match the host system

Bug #1791307 reported by Olivier Tilloy on 2018-09-07
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Medium
Olivier Tilloy

Bug Description

The GTK theme of the chrome and file open/save dialogs doesn't match the theme on the host system.

See attached screenshots.

Olivier Tilloy (osomon) wrote :
Olivier Tilloy (osomon) wrote :
Olivier Tilloy (osomon) on 2018-09-07
Changed in chromium-browser (Ubuntu):
status: New → Triaged
assignee: nobody → Olivier Tilloy (osomon)
importance: Undecided → Medium
Olivier Tilloy (osomon) wrote :

Updated the title and description as I realized this is affecting both versions of the snap (build from the debs, and built from source).

summary: - [snap] GTK theme doesn't match the host system in the snap built from
- source
+ [snap] GTK theme doesn't match the host system
description: updated
Olivier Tilloy (osomon) wrote :

In a xenial VM (with Unity and Ambiance as theme), there is indeed a difference between the snap built from the debs, and the snap built from source: the snap built from the debs displays the expected colours and theming for GTK dialogs, whereas the snap built from source displays different colours and theming (Adwaita?).

Olivier Tilloy (osomon) wrote :

For cosmic, this is a relevant issue: https://github.com/snapcrafters/gtk-common-themes/issues/7 (lack of Yaru in the gtk-common-themes snap).

Olivier Tilloy (osomon) wrote :

It could also be that there are incompatibilities in the theming engines between the version of GTK3 that is used to build the snap (from the xenial repositories) and the one on the host system, maybe?

Olivier Tilloy (osomon) wrote :

Tested the updated gtk-common-themes from the candidate channel (that includes yaru) in a cosmic VM, and no difference, still seeing a default-looking, adwaita-style theme.

Olivier Tilloy (osomon) wrote :

The chromium snap is built on xenial (16.04), and not against the gnome-3-26 backports PPA (https://launchpad.net/~ubuntu-desktop/+archive/ubuntu/gnome-3-26/+packages).

This means that the snap builds against version 3.18 of GTK, which is older than what the gtk-common-themes snap supports (>= 3.20).

As a result, the snap isn’t looking for the current theme's gtk.css under $SNAP/data-dir/themes.
Building against a newer version of GTK would solve the problem.

As an experiment, I rebuilt the stable snap against core18, on bionic, and verified that the issue went away. Core18 is not ready for general use though, there are other issues (among others, lack of support for xdg-open).

bwat47 (bwat47) wrote :

The chromium snap is core18 now, and if anything the theming is even worse now. It seems to only partially respect the system theme, and has bugs like white text on white background, instead of properly respecting yaru's theming. I attached a screenshot

igetin (igetin) wrote :

Some system themes don’t get styled at all on the snap version. In the attachment there’s a comparison of the Adapta theme on the deb & snap versions of Chromium 72.0.3626.119, running on Xubuntu 18.04.

Olivier Tilloy (osomon) wrote :

That's because the Adapta theme is not part of gtk-common-themes.

igetin (igetin) wrote :

Oh, pardon my misunderstanding. Seems like my problem lies in snap itself and is not related to this bug.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.