diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-09-07 17:03:40 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-09-07 17:03:40 (GMT) |
commit | 5988a895176e662dc0a1b0629bb7da1441cfe107 (patch) | |
tree | bbd3dde3ecd26551773d6ab3434f4cc89f3bda70 /shell | |
parent | fbc7bd8b976bb26dddadc43f9b3737a870616149 (diff) |
Write a GridModel, with correct size and layout, and use it
Diffstat (limited to 'shell')
-rw-r--r-- | shell/frame/Frame.py | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/shell/frame/Frame.py b/shell/frame/Frame.py index 70873ba..bdd250d 100644 --- a/shell/frame/Frame.py +++ b/shell/frame/Frame.py @@ -11,30 +11,24 @@ from sugar.canvas.ScreenContainer import ScreenContainer from sugar.canvas.GridLayout import GridLayout from sugar.canvas.GridLayout import GridConstraints from sugar.canvas.GridLayout import GridGroup +from sugar.canvas.GridModel import GridModel class Frame: def __init__(self, shell, owner): self._windows = [] - self._model = goocanvas.CanvasModelSimple() - item = goocanvas.Rect(x=0, y=0, width=800, height=600, - line_width=0, fill_color="#4f4f4f") - self._model.get_root_item().add_child(item) + self._model = GridModel("#4f4f4f") + layout = self._model.get_layout() self._screen_layout = GridLayout() self._screen_container = ScreenContainer(self._windows) - group = GridGroup() - group.props.width = 800 - group.props.height = 600 - layout = group.get_layout() - constraints = GridConstraints(0, 11, 16, 1) self._create_window(constraints) panel = BottomPanel(shell, owner.get_invites()) layout.set_constraints(panel, constraints) - group.add_child(panel) + self._model.add(panel) # Top constraints = GridConstraints(0, 0, 16, 1) @@ -48,7 +42,6 @@ class Frame: constraints = GridConstraints(15, 1, 1, 10) self._create_window(constraints) - self._model.get_root_item().add_child(group) self._screen_container.set_layout(self._screen_layout) def _create_window(self, constraints): |