diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-01-27 23:29:34 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-01-27 23:30:37 -0500 |
commit | 9d9a60c466eb0d338d9c9d23c2e59469a712c64f (patch) | |
tree | 27dd48ee79f65a07b8774e6aacb248061bd94a8d /gtk/gtkcustompaperunixdialog.c | |
parent | 3e67b57396ec0d6cdf567304c62f42d809dd2f86 (diff) | |
download | gtk+-9d9a60c466eb0d338d9c9d23c2e59469a712c64f.tar.gz |
Paper dialog: Use baseline alignment
This improves the positioning of the labels wrt to the spin
buttons.
Diffstat (limited to 'gtk/gtkcustompaperunixdialog.c')
-rw-r--r-- | gtk/gtkcustompaperunixdialog.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gtk/gtkcustompaperunixdialog.c b/gtk/gtkcustompaperunixdialog.c index ec2c11725a..8dd43b798a 100644 --- a/gtk/gtkcustompaperunixdialog.c +++ b/gtk/gtkcustompaperunixdialog.c @@ -556,6 +556,7 @@ new_unit_widget (GtkCustomPaperUnixDialog *dialog, hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); button = gtk_spin_button_new_with_range (0.0, 9999.0, 1); + gtk_widget_set_valign (button, GTK_ALIGN_BASELINE); if (unit == GTK_UNIT_INCH) gtk_spin_button_set_digits (GTK_SPIN_BUTTON (button), 2); else @@ -573,6 +574,7 @@ new_unit_widget (GtkCustomPaperUnixDialog *dialog, label = gtk_label_new (_("inch")); else label = gtk_label_new (_("mm")); + gtk_widget_set_valign (label, GTK_ALIGN_BASELINE); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); @@ -1124,7 +1126,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS label = gtk_label_new_with_mnemonic (_("_Width:")); gtk_widget_set_halign (label, GTK_ALIGN_START); - gtk_widget_set_valign (label, GTK_ALIGN_CENTER); + gtk_widget_set_valign (label, GTK_ALIGN_BASELINE); gtk_widget_show (label); gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1); @@ -1135,7 +1137,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS label = gtk_label_new_with_mnemonic (_("_Height:")); gtk_widget_set_halign (label, GTK_ALIGN_START); - gtk_widget_set_valign (label, GTK_ALIGN_CENTER); + gtk_widget_set_valign (label, GTK_ALIGN_BASELINE); gtk_widget_show (label); gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1); @@ -1155,7 +1157,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS label = gtk_label_new_with_mnemonic (_("_Top:")); gtk_widget_set_halign (label, GTK_ALIGN_START); - gtk_widget_set_valign (label, GTK_ALIGN_CENTER); + gtk_widget_set_valign (label, GTK_ALIGN_BASELINE); gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1); gtk_widget_show (label); @@ -1166,7 +1168,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS label = gtk_label_new_with_mnemonic (_("_Bottom:")); gtk_widget_set_halign (label, GTK_ALIGN_START); - gtk_widget_set_valign (label, GTK_ALIGN_CENTER); + gtk_widget_set_valign (label, GTK_ALIGN_BASELINE); gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1); gtk_widget_show (label); @@ -1177,7 +1179,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS label = gtk_label_new_with_mnemonic (_("_Left:")); gtk_widget_set_halign (label, GTK_ALIGN_START); - gtk_widget_set_valign (label, GTK_ALIGN_CENTER); + gtk_widget_set_valign (label, GTK_ALIGN_BASELINE); gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1); gtk_widget_show (label); @@ -1188,7 +1190,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS label = gtk_label_new_with_mnemonic (_("_Right:")); gtk_widget_set_halign (label, GTK_ALIGN_START); - gtk_widget_set_valign (label, GTK_ALIGN_CENTER); + gtk_widget_set_valign (label, GTK_ALIGN_BASELINE); gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1); gtk_widget_show (label); |