Tweak sizing and positioning to fit better on the olpc
This commit is contained in:
parent
70683c1753
commit
27927f80f6
@ -6,12 +6,12 @@ import gobject
|
|||||||
SM_SPACE_PROPORTIONAL = 0
|
SM_SPACE_PROPORTIONAL = 0
|
||||||
SM_STEP = 1
|
SM_STEP = 1
|
||||||
|
|
||||||
#SLIDING_TIMEOUT = 50
|
SLIDING_TIMEOUT = 50
|
||||||
#SLIDING_MODE = SM_SPACE_PROPORTIONAL
|
SLIDING_MODE = SM_SPACE_PROPORTIONAL
|
||||||
|
|
||||||
SLIDING_TIMEOUT = 10
|
#SLIDING_TIMEOUT = 10
|
||||||
SLIDING_MODE = SM_STEP
|
#SLIDING_MODE = SM_STEP
|
||||||
SLIDING_STEP = 0.05
|
#SLIDING_STEP = 0.05
|
||||||
|
|
||||||
class WindowManager:
|
class WindowManager:
|
||||||
__managers_list = []
|
__managers_list = []
|
||||||
@ -104,7 +104,7 @@ class WindowManager:
|
|||||||
self._x = - int((1.0 - self._sliding_pos) * width)
|
self._x = - int((1.0 - self._sliding_pos) * width)
|
||||||
self._y = int((screen_height - height) / 2)
|
self._y = int((screen_height - height) / 2)
|
||||||
elif self._position is WindowManager.TOP:
|
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)
|
self._y = - int((1.0 - self._sliding_pos) * height)
|
||||||
elif self._position is WindowManager.BOTTOM:
|
elif self._position is WindowManager.BOTTOM:
|
||||||
self._x = int((screen_width - width) / 2)
|
self._x = int((screen_width - width) / 2)
|
||||||
|
@ -352,7 +352,7 @@ class ActivityContainer(dbus.service.Object):
|
|||||||
|
|
||||||
wm = WindowManager(self._presence_window)
|
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_height(1.0, WindowManager.SCREEN_RELATIVE)
|
||||||
wm.set_position(WindowManager.LEFT)
|
wm.set_position(WindowManager.LEFT)
|
||||||
wm.manage()
|
wm.manage()
|
||||||
@ -365,8 +365,8 @@ class ActivityContainer(dbus.service.Object):
|
|||||||
|
|
||||||
self._chat_wm = WindowManager(self._chat_window)
|
self._chat_wm = WindowManager(self._chat_window)
|
||||||
|
|
||||||
self._chat_wm.set_width(0.5, WindowManager.SCREEN_RELATIVE)
|
self._chat_wm.set_width(420, WindowManager.ABSOLUTE)
|
||||||
self._chat_wm.set_height(0.5, WindowManager.SCREEN_RELATIVE)
|
self._chat_wm.set_height(380, WindowManager.ABSOLUTE)
|
||||||
self._chat_wm.set_position(WindowManager.TOP)
|
self._chat_wm.set_position(WindowManager.TOP)
|
||||||
self._chat_wm.manage()
|
self._chat_wm.manage()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user