martinpl / tray-icons-reloaded

GNOME Shell extension which bring back Tray Icons to top panel, with additional features.
GNU General Public License v3.0
481 stars 29 forks source link

Spacing on hiDPI displays #77

Open patrickaldis opened 2 years ago

patrickaldis commented 2 years ago

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

martinpl commented 2 years ago

Can this be compensated via spacings setting?

hedw1gP commented 2 years ago

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.

Ziy1-Tan commented 2 years ago

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

hedw1gP commented 2 years ago

What's your themes? It look like perfect

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

Fonant commented 2 years ago

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.

xuedi commented 2 years ago

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

xalt7x commented 1 year ago

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/trayIconsReloaded@selfmade.pl/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();
jibsaramnim commented 1 year ago

Hack for $HOME/.local/share/gnome-shell/extensions/[trayIconsReloaded@selfmade.pl (mailto:trayIconsReloaded@selfmade.pl)/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
xalt7x commented 1 year ago

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.

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

shade-belisar commented 2 weeks ago

image Even with all spacing set to 0 there still is notably more space in between the tray icons compared to the system menu items. Any chance this can be corrected?

I'm on Fedora Workstation 40, Vanilla GNOME (Wayland).