[gtk+/theming: 13/14] menuitem: set the menubar style class for menu items on a bar



commit 57d7426dd28516d98565cb65c81a7ad90f300503
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Mar 2 18:41:24 2011 -0500

    menuitem: set the menubar style class for menu items on a bar
    
    So that themes can distinguish them from the other menu items.

 gtk/gtkmenuitem.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 5692900..72fbe42 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -1594,6 +1594,9 @@ gtk_menu_item_draw (GtkWidget *widget,
 
   gtk_style_context_get_padding (context, state, &padding);
 
+  if (GTK_IS_MENU_BAR (parent))
+    gtk_style_context_add_class (context, GTK_STYLE_CLASS_MENUBAR);
+
   if (child && (state & GTK_STATE_FLAG_PRELIGHT))
     {
       gtk_render_background (context, cr, x, y, w, h);



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