Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-02-19 08:48:29

uibits
Member
Registered: 2022-07-02
Posts: 20

Zenity --window-icon displays 16px in panel despite 32px needed

I have created a custom icon for a zenity dialog, placing two sizes of the icon in both:

~/.local/share/icons/MY_THEME/16x16/apps
~/.local/share/icons/MY_THEME/32x32/apps

When the zenity dialog appears, it shows the 16px version in the top corner of the dialog properly, but the Xfce panel which should fetch the 32px version of the icon, is only using the 16px version.

It looks blurry, the wrong size, and just not very nice as a result.

Yes, I've tried refreshing the ol cache, with `gtk-update-icon-cache`.

Could this be an Xfce or zenity bug, or a bug for the icon theme manager? If it is widespread is there  way to ham-fist, say zenity, to do the right thing, in the interim?

Thanks for reading.

Offline

#2 2024-02-19 17:37:18

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,985

Re: Zenity --window-icon displays 16px in panel despite 32px needed

but the Xfce panel which should fetch the 32px version of the icon, is only using the 16px version.

Which distro, version of xfce4-panel and version of zenity are you running? At least on the distros that I use, zenity sets the SKIP_TASKBAR atom so that it doesn't show up in the panel.

Also, recent versions of xfce4-panel allow you to force an icon size (see the Appearance tab of panel preference dialog).


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2024-02-24 19:13:44

uibits
Member
Registered: 2022-07-02
Posts: 20

Re: Zenity --window-icon displays 16px in panel despite 32px needed

Hi ToZ thanks for your questions,
I'm unsure but maybe an update will fix this issue. I looked at xfce4-panel's recent changelog and it does mention things in relation to icons. So I'll seek to update before I personally move forward. Cannot update yet, though.

Re the "SKIP_TASKBAR atom", that's interesting, was wondering about why zenity from the terminal doesn't produce panel buttons but running zenity from a script that is started from a .desktop file in /etc/xdg/autostart/ does. I don't know the reasoning for this, I would think that a zenity box, if functional, ought be in the panel. Otherwise they can get buried over.

Thanks yes, I played around with the 'Fixed icon size' option in Panel Preferences > Appearance tab and it does change the respective size of the icon file used in real time, but doesn't affect zenity it seems!

If your good self (or anyone) were to run zenity --info --window-icon=/ICON/FILE/PATH.SVG from a script started from a desktop file in the XDG Autostart folder, and you also get a 16px only, then we will have something concrete to try to fix, I suppose. smile

While writing the above I just realized lol that --window-icon takes a PATH and not an icon name! Whereas zenity's --icon-name attribute takes a proper icon name!

These are the times when I wish things were consistent, haha.

There is probably no way to have zenity be clever, but can we make the panel clever?

Offline

#4 2024-02-25 01:57:17

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,985

Re: Zenity --window-icon displays 16px in panel despite 32px needed

uibits wrote:

Re the "SKIP_TASKBAR atom", that's interesting, was wondering about why zenity from the terminal doesn't produce panel buttons but running zenity from a script that is started from a .desktop file in /etc/xdg/autostart/ does.

That is interesting, yes. I had no idea.

Thanks yes, I played around with the 'Fixed icon size' option in Panel Preferences > Appearance tab and it does change the respective size of the icon file used in real time, but doesn't affect zenity it seems!

If your good self (or anyone) were to run zenity --info --window-icon=/ICON/FILE/PATH.SVG from a script started from a desktop file in the XDG Autostart folder, and you also get a 16px only, then we will have something concrete to try to fix, I suppose. smile

Can you share your .desktop file? It seems to work for me. What if you changed the icon to one from your icon theme - does it work then?


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2024-02-25 03:40:24

uibits
Member
Registered: 2022-07-02
Posts: 20

Re: Zenity --window-icon displays 16px in panel despite 32px needed

Can you share your .desktop file?

I could but I'm pretty sure that the most obvious thing is that the exact path to the icon in the script includes "16x16/" I completely forgot.

I can't test changing that right now but I'm 100% sure that if I put the larger size directory in the filepath then the larger size will appear in the panel but then the wrong size will appear in the zenity dialog box itself.

So I guess the only other idea is to, in the panel, try and identify zenity dialog icons that have "16x16" in the path and try changing path to "(size panel requires)x(size panel requires)", alternatively if the icon is still wrong size for the panel (or not available) try fetching from the icon theme "ICON_BASENAME_ONLY" (obviously stripping off .svg/.png)?

Just trying to think of a good fallback in the interim.

PS. I do remember trying the "ICON_NAME" only for that --window-icon option but it strictly needs a path sad

Last edited by uibits (2024-02-25 03:47:55)

Offline

Board footer

Powered by FluxBB