bug 1303964 draw only background and frame of separator menuitems in GTK versions > 3.20 r?stransky draft
authorKarl Tomlinson <karlt+@karlt.net>
Thu, 17 Nov 2016 11:08:33 +1300
changeset 440198 8b0c9f5e59fd416f8a8960acc49edbec7c3b3c84
parent 440183 a3bfb282cfc5b1514cdaf1d63b674422102f6dcd
child 537321 a8f69f69f7f70affbb97b84948d1f23342cba303
push id36170
push userktomlinson@mozilla.com
push dateThu, 17 Nov 2016 03:46:33 +0000
reviewersstransky
bugs1303964
milestone53.0a1
bug 1303964 draw only background and frame of separator menuitems in GTK versions > 3.20 r?stransky In GTK 3.20, gtk_menu_item_draw() just draws the root widget gadget, depending on the theme to style menu items with CSS name "separator" appropriately. MozReview-Commit-ID: 6AIxPzFe0Rg
widget/gtk/gtk3drawing.cpp
--- a/widget/gtk/gtk3drawing.cpp
+++ b/widget/gtk/gtk3drawing.cpp
@@ -1769,16 +1769,19 @@ moz_gtk_menu_popup_paint(cairo_t *cr, Gd
 static gint
 moz_gtk_menu_separator_paint(cairo_t *cr, GdkRectangle* rect,
                              GtkTextDirection direction)
 {
     GtkWidgetState defaultState = { 0 };
     moz_gtk_menu_item_paint(MOZ_GTK_MENUSEPARATOR, cr, rect,
                             &defaultState, direction);
 
+    if (gtk_get_minor_version() >= 20)
+        return MOZ_GTK_SUCCESS;
+
     GtkStyleContext* style;
     gboolean wide_separators;
     gint separator_height;
     gint x, y, w;
     GtkBorder padding;
 
     style = ClaimStyleContext(MOZ_GTK_MENUSEPARATOR, direction);
     gtk_style_context_get_padding(style, GTK_STATE_FLAG_NORMAL, &padding);