Self-assigned icons in toolbar displayed wrong

*** Please report new bugs here! ***

Moderators: helmut, XnTriq, xnview, Dreamer

Post Reply
Bezier
Posts: 8
Joined: Fri Apr 24, 2020 9:03 am

Self-assigned icons in toolbar displayed wrong

Post by Bezier »

Hi,

It seems that when assigning an icon to a toolbar function, this self-assigned icon is treated differently from the ones pre-assigned: It is smaller and has a colored background.

To reproduce:
- Tools / Settings / Interface / Toolbar
- View mode
- Add "Fit image to window, large only" to toolbar
- Set Icon to XNView's own icons-48/cmd_zoom100.png

Expected result: The two "Zoom 100%" icons in the toolbar look the same.
Observed result: see attached screenshot.

XnViewMP 0.99.7 64 bit; Windows 10 20H2
(similar effect is observed under Linux Mint)

Best regards,

Bezier
Attachments
Capture.JPG
Capture.JPG (9.41 KiB) Viewed 779 times
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Self-assigned icons in toolbar displayed wrong

Post by xnview »

XnView MP has 2 versions of icons (24x24 & 48x48), so you can have difference with the 48x48 version
cmd_zoom100.png
cmd_zoom100.png (1.07 KiB) Viewed 748 times
cmd_zoom100@2x.png
cmd_zoom100@2x.png (2.64 KiB) Viewed 748 times
Pierre.
Bezier
Posts: 8
Joined: Fri Apr 24, 2020 9:03 am

Re: Self-assigned icons in toolbar displayed wrong

Post by Bezier »

Thanks, Pierre.

Given that I use small icons, that let me create one that looks just like the others :)

But it still shows the blue background after startup, or after clicking on it. Just a minor cosmetic issue, of course.

Best regards,

Bezier
Attachments
Capture.JPG
Capture.JPG (9.37 KiB) Viewed 728 times
cmd_fitLarge_24x24.png
cmd_fitLarge_24x24.png (960 Bytes) Viewed 728 times
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Self-assigned icons in toolbar displayed wrong

Post by xnview »

"View>Image file>Fit image to window, large only" is checked?
Pierre.
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Self-assigned icons in toolbar displayed wrong

Post by helmut »

I've just tried the steps in the original post and could reproduce the problem:
When clicking on the added icon the background is blue and remains blue until zoom changes. So the background of the icon isn't permanently blue but only right after clicking on it and until you change the zoom (e.g. by using Ctrl+Mouse wheel).

Perhaps this blue background of the icon is used to indicate that "Fit image to windows, large only" is active? But then, the "Zoom 100%" icon hasn't got this blue background when clicking on it. So there is something wrong.
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Self-assigned icons in toolbar displayed wrong

Post by xnview »

helmut wrote: Thu Mar 03, 2022 5:06 am Perhaps this blue background of the icon is used to indicate that "Fit image to windows, large only" is active? But then, the "Zoom 100%" icon hasn't got this blue background when clicking on it. So there is something wrong.
"Fit image to windows, large only" is like a choice between other fit mode, so selected. Zoom 100% is an action, 'Fit mode' is not changed
Pierre.
Bezier
Posts: 8
Joined: Fri Apr 24, 2020 9:03 am

Re: Self-assigned icons in toolbar displayed wrong

Post by Bezier »

xnview wrote: Wed Mar 02, 2022 8:16 am "View>Image file>Fit image to window, large only" is checked?
Yes, it's checked.
"Fit image to windows, large only" is like a choice between other fit mode, so selected. Zoom 100% is an action, 'Fit mode' is not changed
I understand. As a matter of fact, when clicking on "Zoom 100%", "Zoom +", or "Zoom -", "Fit image to windows, large only" is changed (unchecked in menu, no blue background in toolbar). But I'd say it makes sense this way because once an explicit zoom is applied, the image does indeed not fit to the window anymore.

So it's not a bug but intended behavior, though somewhat confusing for someone who doesn't know XnViewMP as well as you do.

Thanks again for your support; issue can be closed.

Best regards,

Bezier
User avatar
helmut
Posts: 8704
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Re: Self-assigned icons in toolbar displayed wrong

Post by helmut »

Thank you for your reply, Bezier. Problem reproduced (thank you for the detailed problem report), tracked down, analyzed, and solved. :)
Post Reply