diff --git a/sugar/canvas/SnowflakeLayout.py b/sugar/canvas/SnowflakeLayout.py index 9a0c7098..b8c6a3d2 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 bba90f5e..4fd840d6 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)