From 2d2048b94fc903b6102b5b5126419d57605d130a Mon Sep 17 00:00:00 2001 From: pin Date: Mon, 27 Jun 2011 09:44:35 +0000 Subject: [PATCH] =?utf8?q?Am=C3=A9lioration=20cosm=C3=A9tique.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.cri.ensmp.fr/svn/minwii/trunk@356 fe552daf-6dbe-4428-90eb-1537e0879342 --- src/minwii/widgets/playingscreen.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/minwii/widgets/playingscreen.py b/src/minwii/widgets/playingscreen.py index 9c1ebfb..9296646 100755 --- a/src/minwii/widgets/playingscreen.py +++ b/src/minwii/widgets/playingscreen.py @@ -59,11 +59,16 @@ class PlayingScreenBase(pygame.sprite.LayeredDirty, EventHandlerMixin) : columnWidth = int(round(float(dispWidth) / self.keyboardLength)) rects = [] - for i in range(self.keyboardLength) : + for i in range(self.keyboardLength - 1) : upperLeftCorner = (i*columnWidth, 0) rect = pygame.Rect(upperLeftCorner, (columnWidth, dispHeight)) rects.append(rect) + # la dernière colonne a la largeur du reste + upperLeftCorner = ((i+1) * columnWidth, 0) + rect = pygame.Rect(upperLeftCorner, (dispWidth - (self.keyboardLength - 1) * columnWidth , dispHeight)) + rects.append(rect) + self.keyboardRects = rects def _initColumns(self) : -- 2.20.1