[gtk+] GtkModelButton: protect against show_all
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkModelButton: protect against show_all
- Date: Thu, 6 Nov 2014 20:09:23 +0000 (UTC)
commit f229f96d697641f508d68bf2f584bd072719cb5b
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Nov 6 15:01:03 2014 -0500
GtkModelButton: protect against show_all
We don't want the labels to be shown when there's already
an icon.
gtk/gtkmodelbutton.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c
index fa71c8a..79977d4 100644
--- a/gtk/gtkmodelbutton.c
+++ b/gtk/gtkmodelbutton.c
@@ -975,8 +975,10 @@ gtk_model_button_init (GtkModelButton *button)
gtk_widget_set_halign (button->box, GTK_ALIGN_FILL);
gtk_widget_show (button->box);
button->image = gtk_image_new ();
+ gtk_widget_set_no_show_all (button->image, TRUE);
g_object_set (button->image, "margin", 4, NULL);
button->label = gtk_label_new ("");
+ gtk_widget_set_no_show_all (button->label, TRUE);
gtk_container_add (GTK_CONTAINER (button->box), button->image);
gtk_container_add (GTK_CONTAINER (button->box), button->label);
gtk_container_add (GTK_CONTAINER (button), button->box);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]