Opened 9 years ago

Closed 9 years ago

#6810 closed bug (fixed)

(Quickly) Resizing an image can trigger zooming.

Reported by: mmadia Owned by: axeld
Priority: normal Milestone: R1
Component: Applications/ShowImage Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

hrev39385, gcc2 hybrid.

  • Open HAIKU Background Leaf - outline.png.
  • Make sure "Stretch to Window" is not enabled.
  • Quickly enlarge the window.
  • ShowImage will zoom-in. This can be confirmed by selecting 'View original size'

Notes:

  • "Shrink to Window" does not appear to affect results one way or the other.
  • 1 vs. 2 cores does not appear to affect results one way or the other.

Change History (4)

comment:1 Changed 9 years ago by axeld

Actually, resizing should always trigger zooming if "stretch to window" is enabled (but only, if the window is actually larger than the image, of course).

What you see here is neither logical, nor consistent. I just wasn't sure which way to go (ie. honoring shrink/stretch when resizing the window vs. only when the image is first shown).

I think the best user experience would be that the window zooms during resize, but only if the user hasn't manually zoomed before. Another option mentioned by Stephan would be to always keep the current part of the image on screen - but that would have the drawback that it would also resize images when they are shown in 100% zoom.

Opinions welcome, as always :-)

comment:2 Changed 9 years ago by stippi

Maybe it's good to make these options (shrink/zoom to window) always mean "when opening the image". This would at least allow to implement consistent behavior: 1) You can always zoom in and out. 2) When resizing the window, the current zoom level stays locked (perhaps more expected than to lock the visible portion). Additionally, there should be a tool bar with quick access to a function (not a setting) of "fit to window" (besides 1:1 pixels). zuMi has made some great tool bar icons, including the ones needed for these features. WebPositive's IconButton can load vector icons from resources.

comment:3 Changed 9 years ago by axeld

That's how I implemented shrink - just to see which one I liked better :-)

I'm not sure if it's the best solution, since if you shrink the image, making the window larger wouldn't make any sense anymore directly (you would need to zoom into it again, ie. it would require an extra action). Might still be the best to understand, though.

Another idea: make "fit to window" a command, not an option (only leave stretch to window as an option for the fit to window command), and always fit to window on first load -- and when switching to fullscreen, that is.

comment:4 Changed 9 years ago by axeld

Resolution: fixed
Status: newclosed

I've implemented that solution in hrev39431.

Note: See TracTickets for help on using tickets.