Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Quiñones <manuq@laptop.org>2012-10-31 14:44:20 (GMT)
committer Manuel Quiñones <manuq@laptop.org>2012-11-01 11:54:21 (GMT)
commit25497c7677250850472219df316b8bf032b0bf25 (patch)
tree0bdb8f0f06722c8bb08659d5759fb7bae2cd027d
parent8af0d49591383ec3e88458c0e8feb2d0d7ff695f (diff)
Set correct background for subtoolbars - SL #3987
- 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 <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r--src/sugar3/graphics/toolbarbox.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/sugar3/graphics/toolbarbox.py b/src/sugar3/graphics/toolbarbox.py
index ee709dd..1683403 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):