diff options
author | Gonzalo Odiard <gonzalo@laptop.org> | 2012-09-04 08:45:11 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2012-09-07 09:14:25 (GMT) |
commit | d7098e75cb7562d162344b7ed1c9d2af37f84281 (patch) | |
tree | 9ebedf852e145ed70d18e99c9f9553efc5e6798d /src | |
parent | 88c4b013341a6358f13e50619a1a6ef414683f1e (diff) |
ActivityIcon: replace "expose-event" signal by a new "draw" signal
GtkWidget "expose-event" signal has been replaced by
a new "draw" signal [1].
[1] http://developer.gnome.org/gtk3/3.0/ch25s02.html#id1467092
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/jarabe/desktop/favoritesview.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/jarabe/desktop/favoritesview.py b/src/jarabe/desktop/favoritesview.py index b14e707..68796d0 100644 --- a/src/jarabe/desktop/favoritesview.py +++ b/src/jarabe/desktop/favoritesview.py @@ -433,8 +433,8 @@ class ActivityIcon(EventIcon): self._hovering = False self.queue_draw() - def do_expose_event(self, event): - EventIcon.do_expose_event(self, event) + def do_draw(self, cr): + EventIcon.do_draw(self, cr) if not self._hovering: return @@ -449,7 +449,6 @@ class ActivityIcon(EventIcon): height -= ActivityIcon._BORDER_WIDTH radius = width / 10.0 - cr = self.window.cairo_create() cr.move_to(x + radius, y) cr.arc(x + width - radius, y + radius, radius, math.pi * 1.5, math.pi * 2.0) @@ -458,7 +457,7 @@ class ActivityIcon(EventIcon): cr.arc(x + radius, y + height - radius, radius, math.pi * 0.5, math.pi) cr.arc(x + radius, y + radius, radius, math.pi, math.pi * 1.5) - cr.set_source_color(style.COLOR_SELECTION_GREY.get_gdk_color()) + cr.set_source_rgba(*style.COLOR_SELECTION_GREY.get_rgba()) cr.set_line_width(ActivityIcon._BORDER_WIDTH) cr.stroke() |