[evince/gnome-3-12] printing: Fix centering when shrinking to printable area but not scaling
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/gnome-3-12] printing: Fix centering when shrinking to printable area but not scaling
- Date: Mon, 12 May 2014 09:25:04 +0000 (UTC)
commit 10b997c30a33cac44bea7975b17c6ea25610d9c0
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Mon May 12 11:13:16 2014 +0200
printing: Fix centering when shrinking to printable area but not scaling
When shrinking to printable area is selected and we don't need to scale
because the document fits in the printable area, the document is
centered applying the current scale. Since we are not going to scale in
that case, we should ignore any scale value > 1 when shrinking to
printable area.
libview/ev-print-operation.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/libview/ev-print-operation.c b/libview/ev-print-operation.c
index 8957eec..b348038 100644
--- a/libview/ev-print-operation.c
+++ b/libview/ev-print-operation.c
@@ -1868,11 +1868,11 @@ ev_print_operation_print_draw_page (EvPrintOperationPrint *print,
x_scale = (cr_width - left - right) / width;
y_scale = (cr_height - top - bottom) / height;
+ scale = MIN (x_scale, y_scale);
- if (x_scale < y_scale)
- scale = x_scale;
- else
- scale = y_scale;
+ /* Ignore scale > 1 when shrinking to printable area */
+ if (scale > 1.0 && print->page_scale == EV_SCALE_SHRINK_TO_PRINTABLE_AREA)
+ scale = 1.0;
if (print->autorotate) {
double left_right_sides, top_bottom_sides;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]