[gtk+/wip/cssvalue: 156/165] menuitem: Don't set menubar style class randomly



commit 13c8740b4278cb0d87a7fd6c549ed1f84d35e938
Author: Benjamin Otte <otte redhat com>
Date:   Wed Apr 11 15:02:00 2012 +0200

    menuitem: Don't set menubar style class randomly
    
    a) We're not a menubar, you can match on the parent if you have to
    b) It's not set while getting preferred sizes

 gtk/gtkmenuitem.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 5a7b166..756e4aa 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -1602,13 +1602,8 @@ gtk_menu_item_draw (GtkWidget *widget,
   child = gtk_bin_get_child (GTK_BIN (menu_item));
   parent = gtk_widget_get_parent (widget);
 
-  gtk_style_context_save (context);
-
   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);
@@ -1673,8 +1668,6 @@ gtk_menu_item_draw (GtkWidget *widget,
 
   GTK_WIDGET_CLASS (gtk_menu_item_parent_class)->draw (widget, cr);
 
-  gtk_style_context_restore (context);
-
   return FALSE;
 }
 



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