diff options
Diffstat (limited to 'activity.py')
-rw-r--r-- | activity.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/activity.py b/activity.py index d422b89..303e98f 100644 --- a/activity.py +++ b/activity.py @@ -118,7 +118,15 @@ class ChartArea(gtk.DrawingArea): context.fill() # Paint the chart: - context.set_source_surface(self._parent.current_chart.surface) + cw = self._parent.current_chart.width + ch = self._parent.current_chart.height + + x, y, w, h = self.get_allocation() + + cx = x + w / 2 - cw / 2 + cy = y + h / 2 - ch / 2 + + context.set_source_surface(self._parent.current_chart.surface, cx, cy) context.paint() |