From 25497c7677250850472219df316b8bf032b0bf25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= Date: Wed, 31 Oct 2012 11:44:20 -0300 Subject: [PATCH] Set correct background for subtoolbars - SL #3987 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - remove set_app_paintable from _Box to fix the bad coloring of subtoolbars. The documentation say we can't rely on it to paint the themed background when this is set [1]. - don't call Gtk.EventBox.do_draw in the _Box do_draw because that will not paint the child toolbar. Call the child do_draw instead. - revert 7fc29c9d which was a workaround for the most frequent usage [1] http://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-set-app-paintable Signed-off-by: Manuel QuiƱones Acked-by: Simon Schampijer --- src/sugar3/graphics/toolbarbox.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/sugar3/graphics/toolbarbox.py b/src/sugar3/graphics/toolbarbox.py index ee709ddd..16834032 100644 --- a/src/sugar3/graphics/toolbarbox.py +++ b/src/sugar3/graphics/toolbarbox.py @@ -268,10 +268,7 @@ class _Box(Gtk.EventBox): def __init__(self, toolbar_button): GObject.GObject.__init__(self) - self.set_app_paintable(True) self._toolbar_button = toolbar_button - self.modify_bg(Gtk.StateType.NORMAL, - style.COLOR_TOOLBAR_GREY.get_gdk_color()) def do_draw(self, cr): button_alloc = self._toolbar_button.get_allocation() @@ -284,7 +281,7 @@ class _Box(Gtk.EventBox): cr.line_to(self.get_allocation().width, 0) cr.stroke() - Gtk.EventBox.do_draw(self, cr) + self.get_child().do_draw(self, cr) def _setup_page(page_widget, color, hpad):