Ubuntu – Are the close buttons broken on snap apps

19.10gnomesnap

All snap apps seem to have broken close buttons. This can be seen for the Gnome System Monitor and Gnome Calculator. Apps installed via apt look good (Gedit and Gnome Terminal). Is this a known problem for Ubuntu 19.10?

Window decoration of gnome calculator

echo $XDG_CURRENT_DESKTOP

sadf

gsettings list-recursively | egrep "gtk-theme|icon-theme"

org.gnome.desktop.interface icon-theme 'Adwaita'
org.gnome.desktop.interface gtk-theme 'Adwaita'

Best Answer

TL;DR

It is a bug, I have reported it to launchpad to notify the developers about the problem.

As temporary solution you can switch icon theme using GNOME Tweaks → Appearance to one of the following icon sets:

  • Ubuntu-mono-dark
  • Ubuntu-mono-light
  • Yaru

to get normal close button appearance:

Close button with Yaru icon set and Adwaita theme

Analysis

Seems to be a real bug of Snap and theming of such applications on GNOME DE.

I got the same issue using fresh Ubuntu 19.10 installation on VirtualBox with GNOME FlashBack and Adwaita GTK and icon themes.

I have tested all themes (full list from ls /usr/share/themes/ -1) and all icons (full list of ls /usr/share/icons/ -1) which were listed in GNOME Tweaks → Appearance tab and can conclude that many icon sets are broken:

  • Adwaita
  • DMZ-Black
  • DMZ-White
  • hicolor
  • HighContrast
  • Humanity
  • Humanity-Dark
  • LoginIcons

The icon set from above list render garbage on the close button.

The list of correct icon sets is very short:

  • Ubuntu-mono-dark
  • Ubuntu-mono-light
  • Yaru

You can test themes and icon sets on your machine with script below:

#!/bin/bash

DISPLAY=:0

for t in $(ls -1 /usr/share/themes/)
do 
    for i in $(ls -1 /usr/share/icons/)
    do

        echo -e "\nTheme: $t, Icons: $i\n"

        gsettings set org.gnome.desktop.interface gtk-theme "$t"
        gsettings set org.gnome.desktop.interface icon-theme "$i"

        /snap/bin/gnome-calculator

        #read -r -s -p "Press <Enter> for next theme"   
    done
done

Or use GNOME Tweaks to switch themes and icon sets.

Related Question