Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2012-06-28 09:45:23 (GMT)
committer Simon Schampijer <simon@schampijer.de>2012-06-28 09:45:23 (GMT)
commit7774f28c64b9a516ab6f013135714f4d2a74720f (patch)
tree6e5c91b8ad31a18a7e8e6b9f18a42ca6928d8da8
parent50dacc3162554385ba293175c9e17a1788f8ba25 (diff)
Fix SunflowerLayout
- adjusted the _calculate_position method accordingly to the one in RingLayout - return integer positions like in the other RingLayout-based Layouts
-rw-r--r--src/jarabe/desktop/favoriteslayout.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/jarabe/desktop/favoriteslayout.py b/src/jarabe/desktop/favoriteslayout.py
index bbb9e1e..a44ef4f 100644
--- a/src/jarabe/desktop/favoriteslayout.py
+++ b/src/jarabe/desktop/favoriteslayout.py
@@ -437,13 +437,11 @@ class SunflowerLayout(RingLayout):
return i
def _calculate_position(self, radius, icon_size, oindex, children_count,
- sin=math.sin, cos=math.cos):
+ width, height, sin=math.sin, cos=math.cos):
"""Calculate the position of sunflower floret number 'oindex'.
If the result is outside the bounding box, use the next index which
is inside the bounding box."""
- width, height = self.box.get_allocation()
-
while True:
index = self.adjust_index(oindex)
@@ -471,7 +469,7 @@ class SunflowerLayout(RingLayout):
# try again
continue
- return x, y
+ return int(x), int(y)
class BoxLayout(RingLayout):