Small tinkering for race selection (appearance)
This commit is contained in:
@@ -117,7 +117,7 @@ class MainFrame(wx.Frame):
|
||||
self.notebookBrowsers.SetSelection(1)
|
||||
|
||||
self.splitter.SplitVertically(self.notebookBrowsers, self.FitviewAdditionsPanel)
|
||||
self.splitter.SetMinimumPaneSize(200)
|
||||
self.splitter.SetMinimumPaneSize(204)
|
||||
self.splitter.SetSashPosition(300)
|
||||
|
||||
cstatsSizer = wx.BoxSizer(wx.VERTICAL)
|
||||
|
||||
@@ -123,8 +123,23 @@ class RaceSelector(wx.Window):
|
||||
self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnBackgroundErase)
|
||||
self.Bind(wx.EVT_PAINT, self.OnPaint)
|
||||
self.Bind(wx.EVT_LEFT_UP, self.OnLeftUp)
|
||||
self.Bind(wx.EVT_SIZE, self.OnSizeUpdate)
|
||||
|
||||
self.Layout()
|
||||
|
||||
|
||||
def OnSizeUpdate(self,event):
|
||||
rect = self.GetRect()
|
||||
|
||||
if self.layout == wx.HORIZONTAL:
|
||||
width = 0
|
||||
for bmp in self.raceBmps:
|
||||
width += bmp.GetWidth() + self.buttonsPadding
|
||||
posx = (rect.width - width)/2
|
||||
self.buttonsBarPos = (posx,0)
|
||||
self.Refresh()
|
||||
event.Skip()
|
||||
|
||||
def OnLeftUp(self, event):
|
||||
|
||||
mx,my = event.GetPosition()
|
||||
|
||||
Reference in New Issue
Block a user