Zoom - zoom lock - change state from persistent to session

Ideas for improvements and requests for new features in XnView MP

Moderator: xnview

User avatar
user0
XnThusiast
Posts: 3042
Joined: Sat May 09, 2015 9:37 am

Zoom - zoom lock - change state from persistent to session

Post by user0 »

XnViewMP 1.11.2
Windows11 (25H2), display resolution 3840x2160, win scaling 150%


Viewer / Browser-preview
app keeps the 'Lock zoom' state enabled after restart, which is inconvenient because:
- only options from the Settings menu should be persistent (also state from one Viewer tab should not carry over to newly opened one)
- 'Lock zoom' is temporary by nature and does not seem suitable as a persistent setting
- for persistent behavior, 'No fit' auto-zoom could be used instead (though ideally it should zoom to 100% only, but that is a separate issue)


Suggestion
  • change 'Lock zoom' state from persistent to session only
    reset it to disabled when reopening a tab if the session was not saved

    there is already a flag available to control Lock zoom state persistence,
    so its default value should be changed from TRUE (persistent) to FALSE (session-only)

    Code: Select all

    [Viewer]
    lockZoomFlag=true
    


Issue
there is also an inconsistency in the current implementation of Lock zoom persistence in Viewer:
- when Lock zoom is enabled, it takes effect immediately and affects the next image
- however, after restarting with Lock Zoom enabled, it does not override the Autozoom setting until zoom level is changed manually

This should be fixed as well, because if Lock zoom is enabled, it should always override Autozoom.







Related
Last edited by user0 on Sun Jun 07, 2026 4:39 am, edited 1 time in total.
jkm
Posts: 645
Joined: Sat May 11, 2024 12:43 am

Re: Zoom - zoom lock - change state from persistent to session

Post by jkm »

user0 wrote: Thu May 28, 2026 5:59 am XnViewMP 1.11.2
Windows11 (25H2), display resolution 3840x2160, win scaling 150%


Viewer / Browser-preview
app keeps the 'Lock zoom' state enabled after restart, which is inconvenient because:
- only options from the Settings menu should be persistent (also state from one Viewer tab should not carry over to newly opened one)
- 'Lock zoom' is temporary by nature and does not seem suitable as a persistent setting
It's not only Settings menu items that persist..

Other things are also remembered in the viewer, even across restarts, even though they do not have a direct entry in Settings. Examples:
-Info Overlay visibility (in tabbed viewer, not fullscreen)
-Histogram visibility
-Shadow/Highlight clipping

Lots of things persist in this way. I don't think they all need individual items in the Settings dialog.

Whether lock zoom should be persistent is really a matter of individual taste. It does not seem to me that it cries out to be treated differently than things like I listed above...
User avatar
user0
XnThusiast
Posts: 3042
Joined: Sat May 09, 2015 9:37 am

Re: Zoom - zoom lock - change state from persistent to session

Post by user0 »

jkm wrote: Thu May 28, 2026 8:37 pm Whether lock zoom should be persistent is really a matter of individual taste.
there is no room for 'individual taste' here

'Zoom lock' is standard functionality in image viewers that temporarily overrides other zoom modes.
And, as I already mentioned, there is other, more logical way to achieve the same zoom behavior.

jkm wrote: Thu May 28, 2026 8:37 pm It's not only Settings menu items that persist..
Comparing a complex zoom mechanic to simple toggles makes no sense.
Also, the fact that a few simpler features do not follow consistent session/persistence logic is outside the scope of this post.

related
1.5.5 - viewer - info - settings conflict in fullscreen
KLE-France
Posts: 147
Joined: Mon Jan 14, 2019 3:00 pm

Re: Zoom - zoom lock - change state from persistent to session

Post by KLE-France »

user0 wrote: Sat May 30, 2026 5:30 am
jkm wrote: Thu May 28, 2026 8:37 pm Whether lock zoom should be persistent is really a matter of individual taste.
there is no room for 'individual taste' here
I beg to differ; I LOVE that lock zoom is maintained active across sessions and wish that it was the case for the preview window as well!

BUT, that said, I do see your argument.

Concerning a permanent choice relocated to the settings, "No fit" wouldn't be pertinent though, as, at least in my XnView, No fit just presents the image at 100% zoom once opened in the viewer. I doubt that would satisfy... anybody? Thus, it would be vital to maintain the choice of how an image displays at opening. I.e., the Auto zoom choices must be maintained and respected regardless of the 'Lock zoom' state.

I would see the first few lines at Tools > Settings > View more so like this:

Auto zoom [Fit image to window, large only]*
[ ] Reset 'Auto zoom' with next/previous file
[ ] Maintain 'Lock zoom' in active state permanently [ ] in View window [ ] in Full screen [ ] in Preview (can be deactivated per session)




* Or whatever the user chooses
User avatar
user0
XnThusiast
Posts: 3042
Joined: Sat May 09, 2015 9:37 am

Re: Zoom - zoom lock - change state from persistent to session

Post by user0 »

there is already a flag available to control Lock zoom state persistence,
so its default value should be changed from TRUE (persistent) to FALSE (session-only)

Code: Select all

[Viewer]
lockZoomFlag=true

there is also an inconsistency in the current implementation of Lock zoom persistence in Viewer:
- when Lock zoom is enabled, it takes effect immediately and affects the next image
- however, after restarting with Lock Zoom enabled, it does not override the Autozoom setting until zoom level is changed manually.
This should be fixed as well, because if Lock zoom is enabled, it should always override Autozoom.

post updated