From 4eaa096576e9cd8be8cca6026f84fe529e23312b Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Wed, 14 Jun 2006 22:08:18 -0400 Subject: [PATCH] Cast to int where necessary --- sugar/shell/WindowManager.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sugar/shell/WindowManager.py b/sugar/shell/WindowManager.py index 2f645475..2ae1cba4 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)