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.
This commit is contained in:
Marek Kasik 2015-02-20 12:22:26 +01:00
parent cc780116a2
commit 00f9f1cc6b

View File

@ -6424,10 +6424,10 @@ cups_printer_get_hard_margins (GtkPrinter *printer,
} }
else if (cups_printer->media_margin_default_set) else if (cups_printer->media_margin_default_set)
{ {
*left = cups_printer->media_left_margin_default; *left = POINTS_PER_INCH * cups_printer->media_left_margin_default / MM_PER_INCH;
*bottom = cups_printer->media_bottom_margin_default; *bottom = POINTS_PER_INCH * cups_printer->media_bottom_margin_default / MM_PER_INCH;
*right = cups_printer->media_right_margin_default; *right = POINTS_PER_INCH * cups_printer->media_right_margin_default / MM_PER_INCH;
*top = cups_printer->media_top_margin_default; *top = POINTS_PER_INCH * cups_printer->media_top_margin_default / MM_PER_INCH;
result = TRUE; result = TRUE;
} }