Menu

#152 Zoom in then fit to window, scroll bars cause non-fit

open
nobody
gpicview (21)
5
2019-09-04
2009-10-26
Anonymous
No

Steps to reproduce.
1) Open large image, image is automatically zommed out to fit window.
2) Adjust window size so that the width:height ratio closely mimics that of the image, i.e. very little whitespace left around the image. (This step is important.)
3) Click on "Zoom in" so the scroll bars appear.
4) Click on "Fit image to window size".
5) BUG: scroll bars still appear, so a small strip along the bottom and right of the image is covered.

Analysis. The following is my guess only.
- When we zoomed in, the scroll bars caused the viewable area size to be smaller than the window size.
- When we fit to window, image is resampled to window size, but since this exceeds the current viewable area, the scroll bars remain.
- Resulting in a non-fit.

Solution.
- I have no idea how it works. Sorry.

Discussion

  • Nobody/Anonymous

    I've also had this come up occasionally with Iceweasel app.

     
  • Flavius

    Flavius - 2019-09-04

    It looks like this caused by width and height of Scroll bars itself. In case of zooming out available area is calculating like needed width + scroll bar width.
    It would nice to have examples of other GTK2 apps that have scrolls and might fit content to window with it.

     

Log in to post a comment.