diff options
author | Manuel QuiƱones <manuq@laptop.org> | 2012-12-11 12:52:22 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-12-11 13:47:23 (GMT) |
commit | dae382e6eb54fa4f8d9bd6e608a5c067df0ff297 (patch) | |
tree | 39d39fd4560b642da34b5d0c8c84e00de3ef41f1 /widgets.py | |
parent | 1ebc5340f484d4c983bb70756978fdb64bcc997d (diff) |
Draw the color button in the correct order - SL #4303
Same issue in toolkit was fixed in commit 8a9d10cd .
Signed-off-by: Manuel QuiƱones <manuq@laptop.org>
Diffstat (limited to 'widgets.py')
-rw-r--r-- | widgets.py | 24 |
1 files changed, 13 insertions, 11 deletions
@@ -405,17 +405,19 @@ class ButtonStrokeColor(Gtk.ToolItem): title = GObject.property(type=str, getter=get_title, setter=set_title) - def do_expose_event(self, event): + def do_draw(self, cr): child = self.get_child() - allocation = self.get_allocation() + if self._palette and self._palette.is_up(): + allocation = self.get_allocation() + # draw a black background, has been done by the engine before + cr.set_source_rgb(0, 0, 0) + cr.rectangle(0, 0, allocation.width, allocation.height) + cr.paint() + + Gtk.ToolItem.do_draw(self, cr) + if self._palette and self._palette.is_up(): invoker = self._palette.props.invoker - 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.ToolButton.do_expose_event(self, event) + invoker.draw_rectangle(cr, self._palette) + + return False |