Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-09-25 17:59:47 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-09-25 17:59:47 (GMT)
commit9dd98949e53e7847ea823f3dbed666e8c858c53e (patch)
treeb30d1102d24570415f5cde13970b5256a687817a
parent5f88062cba7280a7dca2f49c9d8ad18dd00c0c9b (diff)
Hrm not really sure why I need this
-rw-r--r--sugar/canvas/SnowflakeLayout.py2
-rwxr-xr-xtests/test-snowflake.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/sugar/canvas/SnowflakeLayout.py b/sugar/canvas/SnowflakeLayout.py
index 9a0c709..b8c6a3d 100644
--- a/sugar/canvas/SnowflakeLayout.py
+++ b/sugar/canvas/SnowflakeLayout.py
@@ -28,7 +28,7 @@ class SnowflakeLayout:
[width, height] = self._root.get_size_request()
matrix = cairo.Matrix(1, 0, 0, 1, 0, 0)
- matrix.translate(self._cx - (width / 2), self._cy - (height / 2))
+ matrix.translate(self._cx, self._cy)
self._root.set_transform(matrix)
def _layout_child(self, child, index):
diff --git a/tests/test-snowflake.py b/tests/test-snowflake.py
index bba90f5..4fd840d 100755
--- a/tests/test-snowflake.py
+++ b/tests/test-snowflake.py
@@ -60,6 +60,11 @@ group.translate(500, 500)
_create_snowflake(group, 8)
root.add_child(group)
+layout = SnowflakeLayout()
+group = goocanvas.Group()
+group.translate(20, 500)
+_create_snowflake(group, 2)
+root.add_child(group)
canvas.set_model(canvas_model)