diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-11-19 14:40:10 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-11-19 21:14:30 -0500 |
commit | 45cfb405c0e34c69ccc483455d31febca60abb33 (patch) | |
tree | 82997800374269ec0cc99b0089f648aeb48ab904 | |
parent | d51c9e033740901742eb522a1b1113f4cee8e877 (diff) | |
download | gtk+-45cfb405c0e34c69ccc483455d31febca60abb33.tar.gz |
GtkModelButton: Don't show both text and icon
The intention was that ::iconic indicates which representation is
preferred (text or icon). We fall back to the other representation
if one is missing.
-rw-r--r-- | gtk/gtkmodelbutton.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkmodelbutton.c b/gtk/gtkmodelbutton.c index 79977d4ddc..35772403b7 100644 --- a/gtk/gtkmodelbutton.c +++ b/gtk/gtkmodelbutton.c @@ -205,7 +205,7 @@ update_visibility (GtkModelButton *button) has_icon = gtk_image_get_storage_type (GTK_IMAGE (button->image)) != GTK_IMAGE_EMPTY; has_text = gtk_label_get_text (GTK_LABEL (button->label))[0] != '\0'; - gtk_widget_set_visible (button->image, has_icon); + gtk_widget_set_visible (button->image, has_icon && (button->iconic || !has_text)); gtk_widget_set_visible (button->label, has_text && (!button->iconic || !has_icon)); } |