From 2a4ee7d2e4c89c62f05fe97e7689f3ad589c98af Mon Sep 17 00:00:00 2001 From: Agustin Zubiaga Date: Tue, 06 Mar 2012 23:12:39 +0000 Subject: Resize Fixes. Changes: * Auto resize chart. * Unfullscreen fixed. Signed-off-by: Agustin Zubiaga --- (limited to 'activity.py') diff --git a/activity.py b/activity.py index 8353b2e..646789b 100644 --- a/activity.py +++ b/activity.py @@ -308,6 +308,7 @@ class SimpleGraph(activity.Activity): eventbox = gtk.EventBox() self.charts_area = ChartArea(self) + self.charts_area.connect('size_allocate', self._chart_size_allocate) eventbox.modify_bg(gtk.STATE_NORMAL, WHITE) @@ -335,13 +336,13 @@ class SimpleGraph(activity.Activity): self.update_chart() + def _chart_size_allocate(self, widget, allocation): + self._render_chart() + def unfullscreen(self): self.box.show() activity.Activity.unfullscreen(self) - # A reasonable time for the system - gobject.timeout_add(50, self._render_chart, False) - def __fullscreen_cb(self, button): self.box.hide() self._render_chart(fullscreen=True) -- cgit v0.9.1