tray-icons-reloaded icon indicating copy to clipboard operation
tray-icons-reloaded copied to clipboard

Spacing on hiDPI displays

Open patrickaldis opened this issue 2 years ago • 10 comments

When using the extension on my 4k display, there is way too much padding between icons: Screenshot from 2022-02-07 08-26-16

Compared with setting the resolution to 1080p: Screenshot from 2022-02-07 08-24-39

patrickaldis avatar Feb 07 '22 08:02 patrickaldis

Can this be compensated via spacings setting?

martinpl avatar Feb 12 '22 13:02 martinpl

I think yes, but you need to reduce icon size also. I'm using GNOME 42 with 200% scaling.

The icon with 32 icon, everything set to 0 size:

And, the icon with 20 icon (which matches my theme's top bar icon size), everything set to 0 size:

Note, if your icon looks weird after setting the size, try restarting the extension.

hedw1gP avatar Apr 14 '22 07:04 hedw1gP

I think yes, but you need to reduce icon size also. I'm using GNOME 42 with 200% scaling.

The icon with 32 icon, everything set to 0 size:

And, the icon with 20 icon (which matches my theme's top bar icon size), everything set to 0 size:

Note, if your icon looks weird after setting the size, try restarting the extension.

What's your themes? It look like perfect

Ziy1-Tan avatar May 11 '22 13:05 Ziy1-Tan

What's your themes? It look like perfect

https://github.com/vinceliuice/WhiteSur-gtk-theme

hedw1gP avatar May 12 '22 03:05 hedw1gP

I get this too. Making the icons small helps, but doesn't solve the problem of too much spacing between icons. Only with 200% screen scaling.

Fonant avatar May 30 '22 08:05 Fonant

The icon size 20 does help with the spacing as a workaround, but some icons like nextcloud-client are now tiny indeed :-)

xuedi avatar Jun 25 '22 16:06 xuedi

On Ubuntu22.04 spacing/padding is huge even on 1080p зображення

I've "broken" it with a simple hack and IMO now it looks much better ("overflow menu" is not affected and still looks perfect) зображення

Hack for $HOME/.local/share/gnome-shell/extensions/[email protected]/TrayIndicator.js

@@ -41,7 +41,7 @@
 		setSize(size, margin, padding) {
 			this._size = size;
 			this._margin = margin;
-			this._padding = padding;
+			this._padding = 0;
 
 			this._icons.forEach((icon) => {
 				icon.get_parent().style = this._getButtonStyle();

xalt7x avatar Sep 28 '22 00:09 xalt7x

Hack for $HOME/.local/share/gnome-shell/extensions/[[email protected] (mailto:[email protected])/TrayIndicator.js

For what it's worth, padding is expected to be an object with both vertical and horizontal properties (e.g. { vertical: 0, horizontal: 0 }). I may be mistaken, but wouldn't setting the icon-padding-horizontal and icon-padding-vertical settings to 0 not achieve the same? I'm pretty sure that can be set through the Extension's preferences panel directly, or you could use dconf if desired of course.

dconf write /org/gnome/shell/extensions/trayIconsReloaded/icon-padding-horizontal 0
dconf write /org/gnome/shell/extensions/trayIconsReloaded/icon-padding-vertical 0

jibsaramnim avatar Sep 28 '22 00:09 jibsaramnim

I may be mistaken, but wouldn't setting the icon-padding-horizontal and icon-padding-vertical settings to 0 not achieve the same?

Yes, it does. Somehow I've missed those settings. Thank you! Initially "icon-padding-horizontal" was set to "16". With "4" padding looks very nice.

зображення зображення

xalt7x avatar Sep 28 '22 00:09 xalt7x