[gtk+/pathbar] Copy style context bits from Nautilus



commit 2c59c98b39ec1149b997a5fa1eb2081e6d6b77fc
Author: Federico Mena Quintero <federico gnome org>
Date:   Fri May 3 10:16:12 2013 -0500

    Copy style context bits from Nautilus
    
    We were missing GTK_STYLE_CLASS_LINKED for the entire pathbar, and
    a 'text-button' style class for each path button.
    
    Signed-off-by: Federico Mena Quintero <federico gnome org>

 gtk/gtkpathbar.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index 37b9e61..a74c89c 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -260,6 +260,9 @@ gtk_path_bar_init (GtkPathBar *path_bar)
   priv->icon_size = FALLBACK_ICON_SIZE;
 
   setup_basic_folders (path_bar);
+
+  gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (path_bar)),
+                              GTK_STYLE_CLASS_LINKED);
 }
 
 static void
@@ -1831,6 +1834,8 @@ make_directory_button (GtkPathBar  *path_bar,
 
   button_data->type = find_button_type (path_bar, file);
   button_data->button = gtk_toggle_button_new ();
+  gtk_style_context_add_class (gtk_widget_get_style_context (button_data->button),
+                              "text-button"); /* FIXME: why is there no constant for this style class? */
   atk_obj = gtk_widget_get_accessible (button_data->button);
   gtk_button_set_focus_on_click (GTK_BUTTON (button_data->button), FALSE);
   gtk_widget_add_events (button_data->button, GDK_SCROLL_MASK);


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