From ca0590980bb88598be448345692e5fc6dc9aaa4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
Date: Wed, 5 Dec 2012 14:29:17 -0300
Subject: [PATCH toolkit 2/2] RadioToolButton: draw the outline properly - SL
#
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
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 <manuq@laptop.org>
---
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 fa910fd..a51a39a 100644
a
|
b
|
class RadioToolButton(Gtk.RadioToolButton): |
132 | 132 | |
133 | 133 | def do_draw(self, cr): |
134 | 134 | child = self.get_child() |
135 | | allocation = self.get_allocation() |
136 | | |
137 | 135 | if self.palette and self.palette.is_up(): |
138 | | invoker = self.palette.props.invoker |
139 | | invoker.draw_rectangle(cr, self.palette) |
140 | | |
141 | 136 | allocation = self.get_allocation() |
142 | 137 | # draw a black background, has been done by the engine before |
143 | 138 | cr.set_source_rgb(0, 0, 0) |
… |
… |
class RadioToolButton(Gtk.RadioToolButton): |
146 | 141 | |
147 | 142 | Gtk.RadioToolButton.do_draw(self, cr) |
148 | 143 | |
| 144 | if self.palette and self.palette.is_up(): |
| 145 | invoker = self.palette.props.invoker |
| 146 | invoker.draw_rectangle(cr, self.palette) |
| 147 | |
| 148 | return False |
| 149 | |
149 | 150 | def get_hide_tooltip_on_click(self): |
150 | 151 | return self._hide_tooltip_on_click |
151 | 152 | |