changeset 152:702bc0eb2ac3

Fix Toolbar width to TOOLBAR_WIDTH by not allowing it to resize.
author Simon Cross <hodgestar@gmail.com>
date Thu, 03 Sep 2009 20:55:12 +0000
parents 082868bea873
children 065f43e19e09
files gamelib/gameboard.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/gameboard.py	Thu Sep 03 20:32:56 2009 +0000
+++ b/gamelib/gameboard.py	Thu Sep 03 20:55:12 2009 +0000
@@ -92,6 +92,12 @@
         self.td(icon, align=-1, width=self.rect.w/2)
         self.td(label, align=-1, width=self.rect.w/2)
 
+    def resize(self, width=None, height=None):
+        width, height = gui.Table.resize(self, width, height)
+        width = GameBoard.TOOLBAR_WIDTH
+        return width, height
+
+
 class VidWidget(gui.Widget):
     def __init__(self, gameboard, vid, **params):
         gui.Widget.__init__(self, **params)
@@ -154,7 +160,7 @@
         tbl.tr()
         self.toolbar = ToolBar(self, width=self.TOOLBAR_WIDTH)
         tbl.td(self.toolbar, valign=-1)
-        self.tvw = VidWidget(self, self.tv, width=width-self.TOOLBAR_WIDTH-19, height=height)
+        self.tvw = VidWidget(self, self.tv, width=width-self.TOOLBAR_WIDTH, height=height)
         tbl.td(self.tvw)
         self.top_widget = tbl