diff options
author | Matthias Clasen <mclasen@redhat.com> | 2017-10-06 22:32:53 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-10-06 22:32:53 -0400 |
commit | acb12e1198c7ca583908705ac429a030f2af66e7 (patch) | |
tree | 02c03369d786dbeee12b8aa3cc0233e0206dbf0b | |
parent | 4d3cdfae4438ccea048f22912aa2ff391be2f232 (diff) | |
download | gtk+-acb12e1198c7ca583908705ac429a030f2af66e7.tar.gz |
button: Fix label alignment in checks and radios
Yes, this is ugly, but the alternative is broken ui.
-rw-r--r-- | gtk/gtkbutton.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 998041345c..32764d82b6 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -921,6 +921,10 @@ gtk_button_set_label (GtkButton *button, gtk_label_set_use_underline (GTK_LABEL (child), priv->use_underline); gtk_label_set_mnemonic_widget (GTK_LABEL (child), GTK_WIDGET (button)); } + if (GTK_IS_CHECK_BUTTON (button)) + { + gtk_label_set_xalign (GTK_LABEL (child), 0.0); + } gtk_container_add (GTK_CONTAINER (button), child); gtk_style_context_remove_class (context, "image-button"); gtk_style_context_add_class (context, "text-button"); |