Opened 9 months ago
Last modified 9 months ago
#18869 new bug
ShowImage zoom button should not go into slideshow mode
Reported by: | bitigchi | Owned by: | leavengood |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Applications/ShowImage | Version: | R1/beta4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
Zoom button should resize the window to the image diameters. There is already a slideshow button in the toolbar.
Change History (9)
follow-up: 3 comment:1 by , 9 months ago
comment:2 by , 9 months ago
Which Zoom button do you mean? 64bit hrev57669 nightly cannot reproduce!
follow-up: 4 comment:3 by , 9 months ago
comment:4 by , 9 months ago
Replying to bitigchi:
Is full screen equivalent to zoom?
Not sure I understand the question. That's how Showimage is behaving, and it's one logical behaviour. To change it after decades of usage, it has to bring objective advantages.
follow-up: 6 comment:5 by , 9 months ago
Hmm... I change my opinion on this. :)
Fullscreen is already quickly achieved with a double-click or ALT+ENTER.
The zoom button could zoom the image to 100% and fit the window size to that. A feat not easily done at all ATM...
follow-up: 7 comment:6 by , 9 months ago
Replying to humdinger:
The zoom button could zoom the image to 100% and fit the window size to that. A feat not easily done at all ATM...
Or is it?
diff --git a/src/apps/showimage/ShowImageWindow.cpp b/src/apps/showimage/ShowImageWindow.cpp index 5d73da6f7d..1797e4a134 100644 --- a/src/apps/showimage/ShowImageWindow.cpp +++ b/src/apps/showimage/ShowImageWindow.cpp @@ -631,7 +631,9 @@ ShowImageWindow::_MarkSlideShowDelay(bigtime_t delay) void ShowImageWindow::Zoom(BPoint origin, float width, float height) { - _ToggleFullScreen(); + BRect rect = fImageView->Bitmap()->Bounds(); + float zoom = fImageView->Zoom(); + ResizeTo(rect.Width() * zoom, rect.Height() * zoom); }
That's a quick and dirty "resize the window to current image size". It doesn't take into account the space taken by scrollbars, menu, icon bar, pixel fitting or whatever else. In fact, there's _ResizeWindowToImage
already, not used anywhere, that seems to do all that except it resizes to the 100% image size (capped by screen dimensions and window size limits) without zooming the image, so it still needs a tiny bit of work.
comment:7 by , 9 months ago
comment:8 by , 9 months ago
Old versions of ShowImage had the zoom button do this. It was changed to go to fullscreen mode despite some disagreement over it. I would prefer the old behavior of showing the image in 1:1 size with the window just large enough, if possible, and maybe going to fullscreen if the image is too large to fit on screen?
comment:9 by , 9 months ago
Going fullscreen if the diameters are too large to fit on screen sounds nice, but it should not be triggered involuntarily IMHO. Maybe adding a modifier to the zoom button would be nice like Apple does.
On hrev57649, 64bit, clicking the zoom button shows the image in fullscreen. No slideshow. Expected behaviour IMO.