- Remove zoom button when we do not have PIL and Linux

This commit is contained in:
ccremers 2006-08-10 14:58:08 +00:00
parent 74626bd846
commit 51fbffcacd

View File

@ -142,16 +142,18 @@ class AttackWindow(wx.Frame):
''' Create "interior" window components. In this case it is the ''' Create "interior" window components. In this case it is the
attack picture. ''' attack picture. '''
# Make zoom buttons
sizer = wx.BoxSizer(wx.VERTICAL) sizer = wx.BoxSizer(wx.VERTICAL)
buttons = wx.BoxSizer(wx.HORIZONTAL)
bt = wx.Button(self,wx.ID_ZOOM_100) # Make zoom buttons
buttons.Add(bt,0) if Preference.usePIL():
self.Bind(wx.EVT_BUTTON, self.OnZoom100, bt) buttons = wx.BoxSizer(wx.HORIZONTAL)
bt = wx.Button(self,wx.ID_ZOOM_FIT) bt = wx.Button(self,wx.ID_ZOOM_100)
buttons.Add(bt,0) buttons.Add(bt,0)
self.Bind(wx.EVT_BUTTON, self.OnZoomFit, bt) self.Bind(wx.EVT_BUTTON, self.OnZoom100, bt)
sizer.Add(buttons, 0, wx.ALIGN_LEFT) bt = wx.Button(self,wx.ID_ZOOM_FIT)
buttons.Add(bt,0)
self.Bind(wx.EVT_BUTTON, self.OnZoomFit, bt)
sizer.Add(buttons, 0, wx.ALIGN_LEFT)
# Add attacks (possible with tabs) # Add attacks (possible with tabs)
self.displays=[] self.displays=[]