[gtk+] print: Center sheet drawing horizontally
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] print: Center sheet drawing horizontally
- Date: Sat, 4 Oct 2014 15:03:26 +0000 (UTC)
commit 10d0dad2cfd70b860c514398261658285fd6e137
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Oct 4 10:53:57 2014 -0400
print: Center sheet drawing horizontally
Center the page ordering indicator horizontally, relative to the
spinbutton above it.
gtk/gtkprintunixdialog.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index 5f252c0..a7892de 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -2241,7 +2241,7 @@ draw_collate_cb (GtkWidget *widget,
gboolean collate, reverse, rtl;
gint copies;
gint text_x;
- gint x1, x2, p1, p2, y;
+ gint x, y, x1, x2, p1, p2;
collate = dialog_get_collate (dialog);
reverse = dialog_get_reverse (dialog);
@@ -2252,19 +2252,20 @@ draw_collate_cb (GtkWidget *widget,
gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &size, NULL);
scale = size / 48.0;
- y = (gtk_widget_get_allocated_height (widget) - (26 * scale + 10)) / 2;
+ x = (gtk_widget_get_allocated_width (widget) - 66 * scale) / 2;
+ y = (gtk_widget_get_allocated_height (widget) - 36 * scale) / 2;
if (rtl)
{
- x1 = gtk_widget_get_allocated_width (widget) - 30 * scale;
- x2 = gtk_widget_get_allocated_width (widget) - 65 * scale;
+ x1 = x + 36;
+ x2 = x;
p1 = 0;
p2 = 10;
text_x = 4;
}
else
{
- x1 = 0;
- x2 = 35;
+ x1 = x;
+ x2 = x + 36;
p1 = 10;
p2 = 0;
text_x = 11;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]