Subject: bug#23847: 24.5; dired icon too large

From: Maxim Nikulin <[email-masked]>
Date: Thu, 10 Feb 2022 17:30:24 +0700

On 08/02/2022 13:50, Lars Ingebrigtsen wrote:
> sanette-linux writes:
> 
>> When starting emacs in a graphical ubuntu 16.04 session, the "dired"
>> icon in the toolbar is much larger than the other ones, making the
>> result quite ugly.
>> It might be related to the fact that I have a hi-dpi display and set
>> scale=2 in the unity Display setting. However, other icons in the
>> toolbar have the right size, therefore there surely is something wrong.
> 
> (I'm going through old bug reports that unfortunately weren't resolved
> at the time.)
> 
> I'm unable to reproduce this on a HiDPI display with Gnome Shell with
> the current Emacs.  Are you still seeing this issue in recent Emacs
> versions?

Lars, thank you for grooming the bug tracker.

I faced this bug as unrelated to HiDPI display and namely in KDE. Help 
and open folder toolbar icons have normal sizes in Gnome.

I do not have a VM with latest KDE plasma and Emacs, but I had to add 
the following to my init file on Ubuntu-20.04 focal (latest long time 
support release) with Emacs-26.3:

    '(icon-map-list
      (quote
       ((("etc/images/diropen" . "n:folder-new")
         ("etc/images/help" . "help-contents"))
        x-gtk-stock-map)))

Warning: do not try to to create such structure from easy customization 
UI. Alist pairs will not be wrapped in a list, invalid values will not 
be e.g. rejected by setter and you will get semi-broken emacs spitting 
icon-related errors on attempts of various actions.

The problem is that KDE does not provide these non-standard icons in 
sizes suitable for toolbar, Gtk takes larger versions while other icons 
have normal size.