summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorMarek Kasik <mkasik@redhat.com>2015-02-20 12:22:26 +0100
committerMarek Kasik <mkasik@redhat.com>2015-02-20 12:27:12 +0100
commit00f9f1cc6bda6b6dd1d8091d8b8278be8af61a88 (patch)
treefc12ba136acd5e7bfaf3cb13998ee36467a5d900 /modules
parentcc780116a2e576922a3fd7694ab57409b4e3e4d4 (diff)
downloadgtk+-00f9f1cc6bda6b6dd1d8091d8b8278be8af61a88.tar.gz
printing: Use correct units for margins taken via IPP
cups_printer_get_hard_margins() returned margins in millimeters for margins taken via IPP request instead of Units used before.
Diffstat (limited to 'modules')
-rw-r--r--modules/printbackends/cups/gtkprintbackendcups.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c
index 15546f7189..6777673d80 100644
--- a/modules/printbackends/cups/gtkprintbackendcups.c
+++ b/modules/printbackends/cups/gtkprintbackendcups.c
@@ -6424,10 +6424,10 @@ cups_printer_get_hard_margins (GtkPrinter *printer,
}
else if (cups_printer->media_margin_default_set)
{
- *left = cups_printer->media_left_margin_default;
- *bottom = cups_printer->media_bottom_margin_default;
- *right = cups_printer->media_right_margin_default;
- *top = cups_printer->media_top_margin_default;
+ *left = POINTS_PER_INCH * cups_printer->media_left_margin_default / MM_PER_INCH;
+ *bottom = POINTS_PER_INCH * cups_printer->media_bottom_margin_default / MM_PER_INCH;
+ *right = POINTS_PER_INCH * cups_printer->media_right_margin_default / MM_PER_INCH;
+ *top = POINTS_PER_INCH * cups_printer->media_top_margin_default / MM_PER_INCH;
result = TRUE;
}