Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2006-06-15 02:08:18 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2006-06-15 02:08:18 (GMT)
commit4eaa096576e9cd8be8cca6026f84fe529e23312b (patch)
tree907cb5438b9e84405ba654085adc0638164f531e
parenta4b2e74d257b8abe47fdbc4af9169a413c31a6a2 (diff)
Cast to int where necessary
-rw-r--r--sugar/shell/WindowManager.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/sugar/shell/WindowManager.py b/sugar/shell/WindowManager.py
index 2f64547..2ae1cba 100644
--- a/sugar/shell/WindowManager.py
+++ b/sugar/shell/WindowManager.py
@@ -90,19 +90,19 @@ class WindowManager:
if self._width_type is WindowManager.ABSOLUTE:
width = self._width
elif self._width_type is WindowManager.SCREEN_RELATIVE:
- width = screen_width * self._width
+ width = int(screen_width * self._width)
if self._height_type is WindowManager.ABSOLUTE:
height = self._height
elif self._height_type is WindowManager.SCREEN_RELATIVE:
- height = screen_height * self._height
+ height = int(screen_height * self._height)
if self._position is WindowManager.CENTER:
- x = (screen_width - width) / 2
- y = (screen_height - height) / 2
+ x = int((screen_width - width) / 2)
+ y = int((screen_height - height) / 2)
elif self._position is WindowManager.LEFT:
x = 0
- y = (screen_height - height) / 2
+ y = int((screen_height - height) / 2)
self._window.move(x, y)
self._window.resize(width, height)