[gtk+] print dialog: More baseline alignment
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] print dialog: More baseline alignment
- Date: Sun, 21 Feb 2016 05:10:25 +0000 (UTC)
commit 52e0ab53dc1caf6195990f9bc54f318bb7530c13
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Feb 21 00:09:32 2016 -0500
print dialog: More baseline alignment
Some places were missing the right valign setting to make
baselines line up properly.
gtk/gtkprinteroptionwidget.c | 3 +++
gtk/gtkprintunixdialog.c | 5 ++++-
gtk/ui/gtkprintunixdialog.ui | 4 +++-
3 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkprinteroptionwidget.c b/gtk/gtkprinteroptionwidget.c
index 509119e..47579a6 100644
--- a/gtk/gtkprinteroptionwidget.c
+++ b/gtk/gtkprinteroptionwidget.c
@@ -736,6 +736,7 @@ alternative_append (GtkWidget *box,
button = gtk_radio_button_new_with_label (group, label);
gtk_widget_show (button);
+ gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
g_object_set_data (G_OBJECT (button), "value", (gpointer)value);
@@ -819,6 +820,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
case GTK_PRINTER_OPTION_TYPE_ALTERNATIVE:
group = NULL;
priv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
+ gtk_widget_set_valign (priv->box, GTK_ALIGN_BASELINE);
gtk_widget_show (priv->box);
gtk_box_pack_start (GTK_BOX (widget), priv->box, TRUE, TRUE, 0);
for (i = 0; i < source->num_choices; i++)
@@ -837,6 +839,7 @@ construct_widgets (GtkPrinterOptionWidget *widget)
{
text = g_strdup_printf ("%s:", source->display_text);
priv->label = gtk_label_new_with_mnemonic (text);
+ gtk_widget_set_valign (priv->label, GTK_ALIGN_BASELINE);
g_free (text);
gtk_widget_show (priv->label);
}
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index f47b9bc..fbdf51c 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -1342,13 +1342,16 @@ add_option_to_extension_point (GtkPrinterOption *option,
{
GtkWidget *label, *hbox;
+ gtk_widget_set_valign (widget, GTK_ALIGN_BASELINE);
+
label = gtk_printer_option_widget_get_external_label (GTK_PRINTER_OPTION_WIDGET (widget));
gtk_widget_show (label);
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_label_set_mnemonic_widget (GTK_LABEL (label), widget);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
+ gtk_widget_set_valign (hbox, GTK_ALIGN_BASELINE);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
gtk_widget_show (hbox);
diff --git a/gtk/ui/gtkprintunixdialog.ui b/gtk/ui/gtkprintunixdialog.ui
index 1c3f639..6e758b7 100644
--- a/gtk/ui/gtkprintunixdialog.ui
+++ b/gtk/ui/gtkprintunixdialog.ui
@@ -330,7 +330,7 @@
<object class="GtkLabel" id="label4">
<property name="visible">1</property>
<property name="halign">start</property>
- <property name="valign">center</property>
+ <property name="valign">baseline</property>
<property name="label" translatable="yes">Copie_s:</property>
<property name="use_underline">1</property>
<property name="mnemonic_widget">copies_spin</property>
@@ -344,6 +344,7 @@
<object class="GtkSpinButton" id="copies_spin">
<property name="visible">1</property>
<property name="can_focus">1</property>
+ <property name="valign">baseline</property>
<property name="invisible_char">•</property>
<property name="activates_default">1</property>
<property name="adjustment">copies_spin_adjustment</property>
@@ -594,6 +595,7 @@
<object class="GtkBox" id="box5">
<property name="visible">1</property>
<property name="spacing">6</property>
+ <property name="valign">baseline</property>
<child>
<object class="GtkSpinButton" id="scale_spin">
<property name="visible">1</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]