summaryrefslogtreecommitdiff
path: root/gtk/gtkpathbar.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-07-23 12:42:27 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-07-23 12:44:26 -0400
commit0d1d17107f69d4377a7d18be466ae3fa2816335b (patch)
tree33e7cece0503bdede7d3d0815c4bddb93d953e73 /gtk/gtkpathbar.c
parentd758e9ddd9606121254cfbc01462f841c3d0e2ee (diff)
downloadgtk+-0d1d17107f69d4377a7d18be466ae3fa2816335b.tar.gz
GtkPathBar: Set style classes on buttons
Set text-button/image-button on these, just like we do for buttons everywhere else.
Diffstat (limited to 'gtk/gtkpathbar.c')
-rw-r--r--gtk/gtkpathbar.c10
1 files changed, 10 insertions, 0 deletions
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)