GNOME Bugzilla – Bug 157793
"Zoom to fit page" makes pages too small in some modes mode
Last modified: 2004-12-22 21:47:04 UTC
1. Get a 2-page document in a print-preview window. Type 2 pages of text into Abiword, for example, and choose Print Preview. 2. Click on the far-right icon (a pile of papers), and choose 1x2, so you see the 2 pages side-by-side. 3. Click the second magnifying glass, which should make the pages as big as the window, but doesn't. Result: at most sizes, the pages are much smaller than they need to be to fit in the window. It almost looks like 1x2 uses the same size as is needed for 2x1, since if you go to 1x2-mode, fit-to-window, then go to 2x1-mode, the pages just fit vertically in the window. It's not just 1x2 mode, but that's the most common problem I see. To see this problem with 2x1 mode, make the window really tall and narrow (like 450 x 1000 px). In 1x1 and 2x2 modes, it seems to always work correctly.
How much margin space would you expect betwen the pages and the edge of the window on the right and left. I take it you think there is too much.
Yes, that would be an understatement. In 1x1 and 2x2 modes, there's about 10 pixels between the page and the nearest edge, which seems reasonable. In 1x2 mode, when I have the window maximized, there are several hundred pixels -- the empty space covers more screen than the pages themselves. I can click "zoom in" *twice* and the pages still fit in the window.
I understand now. It in fact looks like the zoom factor is calculated using 2x2 requirements. A short look at the code seems to conflict with that, we will have to look at the details.
The zoom was tied into the max (num rows, num cols). Instead we should have be calculating the required zoom for x and y using the cols/rows and chosing that when fitting. Fixed in cvs. patch will be in 2.8.1 There's still some odd sizing in here. The tops of pages seem too close to the top and the code is rife with magic numbers that seem inconsistent to me.