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

Bug #1791307 reported by Olivier Tilloy
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Triaged
Medium
Unassigned

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.

Tags: snap
Revision history for this message
Olivier Tilloy (osomon) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :
Olivier Tilloy (osomon)
Changed in chromium-browser (Ubuntu):
status: New → Triaged
assignee: nobody → Olivier Tilloy (osomon)
importance: Undecided → Medium
Revision history for this message
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
Revision history for this message
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?).

Revision history for this message
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).

Revision history for this message
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?

Revision history for this message
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.

Revision history for this message
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).

Revision history for this message
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

Revision history for this message
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.

Revision history for this message
Olivier Tilloy (osomon) wrote :

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

Revision history for this message
igetin (igetin) wrote :

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

Revision history for this message
Olivier Tilloy (osomon) wrote :

I confirm bwat47's observation (comment #9). The chrome part of the bug is fixed (except for bug #1800260), but open/save dialogs still don't look good.

Revision history for this message
Olivier Tilloy (osomon) wrote :

This appears to be mostly fixed now.
There are still a few minor discrepancies in the file open/save dialogs, but at least colours are correct.

Revision history for this message
hackel (hackel) wrote :

Not fixed for me. I'm using the Materia Dark theme which still isn't in gtk-common-themes. Chromium / snap apps don't even pick up on the gtk-prefer-dark-theme setting to at least default to Adwaita Dark. Chromium opens up super bright and glaring.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Right, this doesn't help with themes that aren't present in gtk-common-themes.
Which is partly why I'm leaving this bug open.

Revision history for this message
Darko Veberic (darko-veberic-kit) wrote :

also the custom dpi setting for the desktop is somehow not passed on (in my case xfce). chromium-browser on a 4k display is readable only by setting the fonts to ridiculous sizes which makes font rendering broken in many web pages.

Revision history for this message
Olivier Tilloy (osomon) wrote :

That last comment was already reported as bug #1868162, no need to derail other bug reports with an unrelated topic.

summary: - [snap] GTK theme doesn't match the host system
+ GTK theme doesn't match the host system
Olivier Tilloy (osomon)
summary: - GTK theme doesn't match the host system
+ [snap] GTK theme doesn't match the host system
Olivier Tilloy (osomon)
Changed in chromium-browser (Ubuntu):
assignee: Olivier Tilloy (osomon) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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