Package: adwaita-icon-theme
Version: 43-1
Severity: normal

Dear Maintainer,

Some legacy icons are distributed in only a subset of sizes, whereas
there is a symbolic version with all sizes.  Unfortunately, GTK's
symbolic fallback will not kick in if the icon exists non-symbolic at
any size, leading to weird broken UI for applications using those.

Namely, Geany still uses GTK_STOCK_CLEAR ("edit-clear" icon) and
GTK_STOCK_CLOSE ("window-close" icon), and Adwaita (v43) only has sizes
48 for the former, and 24 and 48 for the latter.  This leads to a silly
UI wasting lots of screen estate.

Yes, Geany could be updated to use the symbolic icons, and upstream
will probably do so in the future, but it's unlikely it is the only app
affected.  Moreover, it's unnoticeable with most other themes, that
don't show the issue.

Adwaita 45.0 currently in testing/unstable does not have them anymore,
fixing the issue as GTK will fall back on the symbolic icons, which are
available at reasonable sizes.  However, this doesn't fix apps in
stable.

File list from 43:

$ find /usr/share/icons/Adwaita/ -name window-close.png -o -name edit-clear.png
/usr/share/icons/Adwaita/48x48/legacy/window-close.png
/usr/share/icons/Adwaita/48x48/legacy/edit-clear.png
/usr/share/icons/Adwaita/24x24/legacy/window-close.png

Note that removing/moving those away and updating the icon cache fixes
the issue for Geany.  Maybe other icons affect other apps however.

It could be interesting to review the sizes in which icons are
distributed, as it might have similar effect if only a subset of sizes
is available (esp. if 16 or 24 is missing).

Attached Python program shows the behavior when used in a button and in
an entry, in three variants: GtkStock API, icon-name and
symbolic-icon-name.  You can easily see that they get better in that
order; and if you remove the offending icons from the theme, they all
magically work nicely.

I think this should be considered for Bookworm as it affects standard
installation of regular packages (GNOME + Geany, and possibly others).

Regards,
Colomban


PS: admittedly, I'm not entirely neutral in the matter, being a Geany
developer.  But still :)


-- System Information:
Debian Release: 12.1
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable-debug'), (500, 
'oldstable-security'), (500, 'oldstable-debug'), (500, 'stable'), (500, 
'oldstable'), (50, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-10-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages adwaita-icon-theme depends on:
ii  gtk-update-icon-cache  3.24.38-2~deb12u1
ii  hicolor-icon-theme     0.17-2

Versions of packages adwaita-icon-theme recommends:
ii  librsvg2-common  2.54.7+dfsg-1~deb12u1

adwaita-icon-theme suggests no packages.

-- no debconf information
#!/usr/bin/env python3

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk


if __name__ == '__main__':
    # force use of Adwaita icon theme
    Gtk.Settings.get_default().set_property("gtk-icon-theme-name", "Adwaita")

    box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, visible=True)

    box.add(Gtk.Button(child=Gtk.Image(stock="gtk-clear",
                                       icon_size=Gtk.IconSize.BUTTON,
                                       visible=True), visible=True))
    box.add(Gtk.Button(child=Gtk.Image(icon_name="edit-clear",
                                       icon_size=Gtk.IconSize.BUTTON,
                                       visible=True), visible=True))
    box.add(Gtk.Button(child=Gtk.Image(icon_name="edit-clear-symbolic",
                                       icon_size=Gtk.IconSize.BUTTON,
                                       visible=True), visible=True))

    box.add(Gtk.Entry(primary_icon_stock="gtk-close",
                      secondary_icon_stock="gtk-clear",
                      visible=True))
    box.add(Gtk.Entry(primary_icon_name="window-close",
                      secondary_icon_name="edit-clear",
                      visible=True))
    box.add(Gtk.Entry(primary_icon_name="window-close-symbolic",
                      secondary_icon_name="edit-clear-symbolic",
                      visible=True))

    window = Gtk.Window(child=box, visible=True)
    window.connect('destroy', Gtk.main_quit)

    Gtk.main()

Reply via email to