gtk2/gtk2-rotate-layout.patch

26 lines
1.1 KiB
Diff
Raw Normal View History

2009-11-11 02:40:40 +00:00
--- gtk+-2.18.3/modules/printbackends/cups/gtkprintbackendcups.c 2009-11-02 12:10:58.000000000 +0100
+++ gtk+-2.18.3/modules/printbackends/cups/gtkprintbackendcups.c 2009-11-02 12:11:18.000000000 +0100
@@ -4317,18 +4317,18 @@ cups_printer_prepare_for_print (GtkPrint
break;
case GTK_PAGE_ORIENTATION_LANDSCAPE:
if (layout < 4)
- layout = layout + 5 - 2 * (layout % 2);
+ layout = layout + 2 + 4 * (1 - layout / 2);
else
- layout = layout - 6 + 4 * (1 - (layout - 4) / 2);
+ layout = layout - 3 - 2 * (layout % 2);
break;
case GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT:
layout = (layout + 3 - 2 * (layout % 2)) % 4 + 4 * (layout / 4);
break;
case GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE:
if (layout < 4)
- layout = layout + 2 + 4 * (1 - layout / 2);
+ layout = layout + 5 - 2 * (layout % 2);
else
- layout = layout - 3 - 2 * (layout % 2);
+ layout = layout - 6 + 4 * (1 - (layout - 4) / 2);
break;
}