# HG changeset patch # User Simon Cross # Date 1252011312 0 # Node ID 702bc0eb2ac320dfa308322bc3041f1ddda48bae # Parent 082868bea873d84de6d2a0329c7646c9812e5fd7 Fix Toolbar width to TOOLBAR_WIDTH by not allowing it to resize. diff -r 082868bea873 -r 702bc0eb2ac3 gamelib/gameboard.py --- 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