From 0d1d17107f69d4377a7d18be466ae3fa2816335b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 23 Jul 2014 12:42:27 -0400 Subject: GtkPathBar: Set style classes on buttons Set text-button/image-button on these, just like we do for buttons everywhere else. --- gtk/gtkpathbar.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gtk/gtkpathbar.c') diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c index ec1f5ed74c..208a810ae4 100644 --- a/gtk/gtkpathbar.c +++ b/gtk/gtkpathbar.c @@ -1527,15 +1527,25 @@ gtk_path_bar_update_button_appearance (GtkPathBar *path_bar, gboolean current_dir) { const gchar *dir_name = get_dir_name (button_data); + GtkStyleContext *context; + + context = gtk_widget_get_style_context (button_data->button); + + gtk_style_context_remove_class (context, "text-button"); + gtk_style_context_remove_class (context, "image-button"); if (button_data->label != NULL) { gtk_label_set_text (GTK_LABEL (button_data->label), dir_name); + if (button_data->image == NULL) + gtk_style_context_add_class (context, "text-button"); } if (button_data->image != NULL) { set_button_image (path_bar, button_data); + if (button_data->label == NULL) + gtk_style_context_add_class (context, "image-button"); } if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button_data->button)) != current_dir) -- cgit v1.2.1