From 2a6ad05bc9a66ddaf8d57320c09ef41daa0ae4a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= Date: Wed, 5 Dec 2012 14:29:17 -0300 Subject: [PATCH] RadioToolButton: draw the outline properly - SL #3936 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now the do_draw method is exactly the same as the one for ToolButton. This considers the border that the radio button can have, which is needed for the changes made in the theme to get back the original style. Signed-off-by: Manuel QuiƱones Acked-by: Simon Schampijer --- src/sugar3/graphics/radiotoolbutton.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/sugar3/graphics/radiotoolbutton.py b/src/sugar3/graphics/radiotoolbutton.py index fa910fda..a51a39a6 100644 --- a/src/sugar3/graphics/radiotoolbutton.py +++ b/src/sugar3/graphics/radiotoolbutton.py @@ -132,12 +132,7 @@ class RadioToolButton(Gtk.RadioToolButton): def do_draw(self, cr): 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) - allocation = self.get_allocation() # draw a black background, has been done by the engine before cr.set_source_rgb(0, 0, 0) @@ -146,6 +141,12 @@ class RadioToolButton(Gtk.RadioToolButton): Gtk.RadioToolButton.do_draw(self, cr) + if self.palette and self.palette.is_up(): + invoker = self.palette.props.invoker + invoker.draw_rectangle(cr, self.palette) + + return False + def get_hide_tooltip_on_click(self): return self._hide_tooltip_on_click