[Sugar-devel] [PATCH Clock] Set clock center relative to ClockFace widget, not activity window

Manuel Quiñones manuq at laptop.org
Mon Mar 26 14:30:30 EDT 2012


This fixes bug #3394 .

Signed-off-by: Manuel Quiñones <manuq at laptop.org>
---
 clock.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/clock.py b/clock.py
index 1893b77..825fb93 100755
--- a/clock.py
+++ b/clock.py
@@ -530,8 +530,8 @@ class ClockFace(gtk.DrawingArea):
         of the clock, radius).
         """
         # Store the measures of the clock face widget
-        self._center_x = int(allocation.x + allocation.width / 2.0)
-        self._center_y = int(allocation.y + allocation.height / 2.0)
+        self._center_x = int(allocation.width / 2.0)
+        self._center_y = int(allocation.height / 2.0)
         self._radius = max(min(int(allocation.width / 2.0), \
                 int(allocation.height / 2.0)) - 20, 0)
         self._width = allocation.width
-- 
1.7.7.6



More information about the Sugar-devel mailing list