[nautilus/gnome-3-20] pathbar: add image-button class to iconic buttons



commit 1fefa0e5e777bfc6ddf17f4454211a5f0d0ce3bb
Author: Carlos Soriano <csoriano gnome org>
Date:   Thu Mar 3 17:49:36 2016 +0100

    pathbar: add image-button class to iconic buttons
    
    Request from Lapo.

 src/nautilus-pathbar.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index 8505b90..104d97e 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -1600,10 +1600,14 @@ nautilus_path_bar_update_button_appearance (ButtonData *button_data)
        icon = get_gicon (button_data);
        if (icon != NULL) {
                gtk_image_set_from_gicon (GTK_IMAGE (button_data->image), icon, GTK_ICON_SIZE_MENU);
+               gtk_style_context_add_class (gtk_widget_get_style_context (button_data->button),
+                                            "image-button");
                gtk_widget_show (GTK_WIDGET (button_data->image));
                g_object_unref (icon);
        } else {
                gtk_widget_hide (GTK_WIDGET (button_data->image));
+               gtk_style_context_remove_class (gtk_widget_get_style_context (button_data->button),
+                                               "image-button");
        }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]