[haiku-bugs] Re: [Haiku] #8668: [ShowImage] Improved zoom button behavior

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sun, 24 Mar 2019 16:22:47 -0000

#8668: [ShowImage] Improved zoom button behavior
--------------------------------------+----------------------------
   Reporter:  mmadia                  |      Owner:  leavengood
       Type:  enhancement             |     Status:  new
   Priority:  normal                  |  Milestone:  R1
  Component:  Applications/ShowImage  |    Version:  R1/Development
 Resolution:                          |   Keywords:
 Blocked By:                          |   Blocking:  8665
Has a Patch:  0                       |   Platform:  All
--------------------------------------+----------------------------

Comment (by leavengood):

 I can get behind most of your idea pulkomandy. It seems fairly close to
 mine, except subsequent clicks on the window zoom button would do nothing
 if the window was already in the "ideal" zoomed state. Which is probably
 fine. I would expect the zoom button to end up maximizing the window most
 of the time since nowadays most digital camera or phone images are pretty
 high resolution. But if you are browsing smaller images or have a high
 resolution screen it would be nice if zooming made the window fit.

 Regarding your going further section: at first I was going to reject the
 idea of changing the window size on image zooming, but the more I think
 about it, the more it makes sense. I can try adding it to see. Either way
 we need a routine in the code to resize the window to fit the image, so it
 is just a matter of calling that after an image zoom, or not.

 What I like about this idea is it does not require maintaining any extra
 state (at least I don't think so.) You just look at the current size of
 the zoomed image, and resize the window to that, but no bigger than the
 screen size, and of course no smaller than the minimum window size.

 There is one final wrinkle to all this: how should the window be moved if
 it will not be maximized? Should we try to keep it as close to where it is
 as possible, only moving it to avoid the window going off the screen (aka
 maintain the window tab as close to where it is?) Or should it always be
 centered on the screen? Or maybe it is resized around the center point of
 the current window, which makes a lot of sense when changing the window
 size on image zooming...

 By the way, it is probably obvious, but I am discussing this in such depth
 so that a few of us can come to a consensus, I can implement that, and
 then code review will be just about code, not behavior.

 Also, boy is it confusing talking about the window zoom button and also
 the zoom level of the image...

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/8668#comment:10>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: