diff options
author | Marco Pesenti Gritti <marco@marcopg.org> | 2008-12-18 22:53:44 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@marcopg.org> | 2008-12-18 22:53:44 (GMT) |
commit | 4b38ff298b8aa01e7d602f587362adb43cc937d8 (patch) | |
tree | 662bae56a1565fc4c87a58721a86914f22b01a34 | |
parent | 347cc9413b2021ddc54911d02aa1a8f9eb90f0cf (diff) |
Fix palette highlighting on tray icons. Patch by benzea, style tweaks by me.
-rw-r--r-- | src/sugar/graphics/palette.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/sugar/graphics/palette.py b/src/sugar/graphics/palette.py index 3623dce..3efbcdc 100644 --- a/src/sugar/graphics/palette.py +++ b/src/sugar/graphics/palette.py @@ -1003,23 +1003,25 @@ class WidgetInvoker(Invoker): return True def draw_rectangle(self, event, palette): + if self._widget.flags() & gtk.NO_WINDOW: + x, y = self._widget.allocation.x, self._widget.allocation.y + else: + x = y = 0 + wstyle = self._widget.get_style() gap = _calculate_gap(self.get_rect(), palette.get_rect()) + if gap: wstyle.paint_box_gap(event.window, gtk.STATE_PRELIGHT, gtk.SHADOW_IN, event.area, self._widget, - "palette-invoker", - self._widget.allocation.x, - self._widget.allocation.y, + "palette-invoker", x, y, self._widget.allocation.width, self._widget.allocation.height, gap[0], gap[1], gap[2]) else: wstyle.paint_box(event.window, gtk.STATE_PRELIGHT, gtk.SHADOW_IN, event.area, self._widget, - "palette-invoker", - self._widget.allocation.x, - self._widget.allocation.y, + "palette-invoker", x, y, self._widget.allocation.width, self._widget.allocation.height) |