diff options
Diffstat (limited to 'src/sugar3/graphics/radiotoolbutton.py')
-rw-r--r-- | src/sugar3/graphics/radiotoolbutton.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/sugar3/graphics/radiotoolbutton.py b/src/sugar3/graphics/radiotoolbutton.py index d843b1f..8fd01f7 100644 --- a/src/sugar3/graphics/radiotoolbutton.py +++ b/src/sugar3/graphics/radiotoolbutton.py @@ -165,12 +165,18 @@ class RadioToolButton(Gtk.RadioToolButton): palette_invoker = GObject.property( type=object, setter=set_palette_invoker, getter=get_palette_invoker) - def do_draw(self, cr): + def do_expose_event(self, event): child = self.get_child() allocation = self.get_allocation() if self.palette and self.palette.is_up(): invoker = self.palette.props.invoker - invoker.draw_rectangle(cr, self.palette) - - Gtk.RadioToolButton.do_draw(self, cr) + invoker.draw_rectangle(event, self.palette) + elif child.state == Gtk.StateType.PRELIGHT: + child.style.paint_box(event.window, Gtk.StateType.PRELIGHT, + Gtk.ShadowType.NONE, event.area, + child, 'toolbutton-prelight', + allocation.x, allocation.y, + allocation.width, allocation.height) + + Gtk.RadioToolButton.do_expose_event(self, event) |