diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2008-04-18 23:10:48 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2008-04-18 23:10:48 (GMT) |
commit | 283b20114576b1e29d856911d188ce3c73865012 (patch) | |
tree | 3f3fbe63475506ae340590f2564dd9d4085b6dc7 /sugar/graphics/toggletoolbutton.py | |
parent | 8783d1113d945b25d5deedae574be52dcf4d34e5 (diff) |
pylint most of sugar.graphics, only palette left
Diffstat (limited to 'sugar/graphics/toggletoolbutton.py')
-rw-r--r-- | sugar/graphics/toggletoolbutton.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sugar/graphics/toggletoolbutton.py b/sugar/graphics/toggletoolbutton.py index 3d05cc0..4c59f80 100644 --- a/sugar/graphics/toggletoolbutton.py +++ b/sugar/graphics/toggletoolbutton.py @@ -46,17 +46,18 @@ class ToggleToolButton(gtk.ToggleToolButton): self.set_palette(Palette(text)) def do_expose_event(self, event): + allocation = self.get_allocation() + child = self.get_child() + if self._palette and self._palette.is_up(): invoker = self._palette.props.invoker invoker.draw_rectangle(event, self._palette) - elif self.child.state == gtk.STATE_PRELIGHT: - self.child.style.paint_box(event.window, gtk.STATE_PRELIGHT, - gtk.SHADOW_NONE, event.area, - self.child, "toolbutton-prelight", - self.allocation.x, - self.allocation.y, - self.allocation.width, - self.allocation.height) + elif child.state == gtk.STATE_PRELIGHT: + child.style.paint_box(event.window, gtk.STATE_PRELIGHT, + gtk.SHADOW_NONE, event.area, + child, "toolbutton-prelight", + allocation.x, allocation.y, + allocation.width, allocation.height) gtk.ToggleToolButton.do_expose_event(self, event) |