From 27927f80f63dcb25a208bf98150a4b3f8d2f856d Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 30 Jun 2006 11:30:32 -0400 Subject: [PATCH] Tweak sizing and positioning to fit better on the olpc --- shell/WindowManager.py | 12 ++++++------ shell/shell.py | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/shell/WindowManager.py b/shell/WindowManager.py index ee55e39d..9fb84109 100644 --- a/shell/WindowManager.py +++ b/shell/WindowManager.py @@ -6,12 +6,12 @@ import gobject SM_SPACE_PROPORTIONAL = 0 SM_STEP = 1 -#SLIDING_TIMEOUT = 50 -#SLIDING_MODE = SM_SPACE_PROPORTIONAL +SLIDING_TIMEOUT = 50 +SLIDING_MODE = SM_SPACE_PROPORTIONAL -SLIDING_TIMEOUT = 10 -SLIDING_MODE = SM_STEP -SLIDING_STEP = 0.05 +#SLIDING_TIMEOUT = 10 +#SLIDING_MODE = SM_STEP +#SLIDING_STEP = 0.05 class WindowManager: __managers_list = [] @@ -104,7 +104,7 @@ class WindowManager: self._x = - int((1.0 - self._sliding_pos) * width) self._y = int((screen_height - height) / 2) elif self._position is WindowManager.TOP: - self._x = int((screen_width - width) / 2) + self._x = int(screen_width - width - 10) self._y = - int((1.0 - self._sliding_pos) * height) elif self._position is WindowManager.BOTTOM: self._x = int((screen_width - width) / 2) diff --git a/shell/shell.py b/shell/shell.py index 16473140..c293d5f2 100755 --- a/shell/shell.py +++ b/shell/shell.py @@ -352,7 +352,7 @@ class ActivityContainer(dbus.service.Object): wm = WindowManager(self._presence_window) - wm.set_width(0.18, WindowManager.SCREEN_RELATIVE) + wm.set_width(170, WindowManager.ABSOLUTE) wm.set_height(1.0, WindowManager.SCREEN_RELATIVE) wm.set_position(WindowManager.LEFT) wm.manage() @@ -365,8 +365,8 @@ class ActivityContainer(dbus.service.Object): self._chat_wm = WindowManager(self._chat_window) - self._chat_wm.set_width(0.5, WindowManager.SCREEN_RELATIVE) - self._chat_wm.set_height(0.5, WindowManager.SCREEN_RELATIVE) + self._chat_wm.set_width(420, WindowManager.ABSOLUTE) + self._chat_wm.set_height(380, WindowManager.ABSOLUTE) self._chat_wm.set_position(WindowManager.TOP) self._chat_wm.manage()