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/toolbutton.py | |
parent | 8783d1113d945b25d5deedae574be52dcf4d34e5 (diff) |
pylint most of sugar.graphics, only palette left
Diffstat (limited to 'sugar/graphics/toolbutton.py')
-rw-r--r-- | sugar/graphics/toolbutton.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sugar/graphics/toolbutton.py b/sugar/graphics/toolbutton.py index 08bc1f3..236d7ec 100644 --- a/sugar/graphics/toolbutton.py +++ b/sugar/graphics/toolbutton.py @@ -106,20 +106,21 @@ class ToolButton(gtk.ToolButton): self._palette = palette self._palette.props.invoker = ToolInvoker(self) - palette = gobject.property(type=object, setter=set_palette, getter=get_palette) + palette = gobject.property( + type=object, setter=set_palette, getter=get_palette) 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(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.ToolButton.do_expose_event(self, event) |