After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 157793 - "Zoom to fit page" makes pages too small in some modes mode
"Zoom to fit page" makes pages too small in some modes mode
Status: RESOLVED FIXED
Product: gnome-print
Classification: Deprecated
Component: print preview
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2004-11-09 22:26 UTC by Ken Harris
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6



Description Ken Harris 2004-11-09 22:26:09 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.
Comment 1 Andreas J. Guelzow 2004-11-10 08:11:45 UTC
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.
Comment 2 Ken Harris 2004-11-10 09:04:22 UTC
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.
Comment 3 Andreas J. Guelzow 2004-11-10 14:03:35 UTC
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.
Comment 4 Jody Goldberg 2004-11-16 15:12:07 UTC
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.