Ignore:
Timestamp:
Apr 10, 2014 9:58:13 AM (11 years ago)
Author:
Mathieu Doucet <doucetm@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
98816c43
Parents:
990c2eb
Message:

Fix startup config dialog layout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sans/guiframe/startup_configuration.py

    rf7bead2 r062ebef  
    4848except: 
    4949    CURRENT_STRINGS = DEFAULT_STRINGS 
    50      
     50FONT_VARIANT = 0     
    5151if sys.platform.count("win32") > 0: 
    5252    PANEL_WIDTH = 265  
    5353    PANEL_HEIGHT = 235 
    54     FONT_VARIANT = 0 
    5554else: 
    5655    PANEL_WIDTH = 285 
    57     PANEL_HEIGHT = 255 
    58     FONT_VARIANT = 1 
     56    PANEL_HEIGHT = 215 
    5957     
    6058""" 
     
    7775        self.return_string = copy.deepcopy(DEFAULT_STRINGS) 
    7876        # build layout 
    79         panel = wx.Panel(self, -1) 
    8077        vbox = wx.BoxSizer(wx.VERTICAL) 
    81         wx.StaticBox(panel, -1, 'Set View-Configuration', (5, 5), 
    82                       (PANEL_WIDTH*0.94, PANEL_HEIGHT*0.7)) 
    83         default_bt = wx.RadioButton(panel, -1, 'Default View', (15, 30),  
     78        title_text = wx.StaticText(self, id=wx.NewId(), label='Set interface configuration') 
     79 
     80        default_bt = wx.RadioButton(self, -1, 'Default View', (15, 30),  
    8481                                    style=wx.RB_GROUP) 
    8582        default_bt.Bind(wx.EVT_RADIOBUTTON, self.OnDefault) 
    8683        default_bt.SetValue(True) 
    87         current_bt = wx.RadioButton(panel, -1, 'Current View', (15, 55)) 
     84        current_bt = wx.RadioButton(self, -1, 'Current View', (15, 55)) 
    8885        current_bt.SetValue(False) 
    8986        current_bt.Bind(wx.EVT_RADIOBUTTON, self.OnCurrent) 
    9087        msg = "\nThis new configuration will take effect when\n" 
    9188        msg += "running this application next time." 
    92         note_txt = wx.StaticText(panel, -1, msg, (15, 75)) 
     89        note_txt = wx.StaticText(self, -1, msg, (15, 75)) 
    9390        note_txt.SetForegroundColour("black") 
     91         
    9492        hbox = wx.BoxSizer(wx.HORIZONTAL) 
    95          
    9693        okButton = wx.Button(self, wx.ID_OK, 'Set', size=(70, 25)) 
    9794        closeButton = wx.Button(self,wx.ID_CANCEL, 'Cancel', size=(70, 25)) 
    9895        hbox.Add(closeButton, 1, wx.RIGHT, 5) 
    9996        hbox.Add(okButton, 1, wx.RIGHT, 5) 
    100         vbox.Add(panel, 1, wx.ALIGN_CENTER | wx.BOTTOM, 5) 
    101         vbox.Add(hbox, 1, wx.ALIGN_CENTER | wx.BOTTOM, 5) 
    102         # set sizer 
     97 
     98        vbox.Add(title_text, 0, wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, 10) 
     99        vbox.Add(default_bt, 0, wx.LEFT, 20) 
     100        vbox.Add(current_bt, 0, wx.LEFT, 20) 
     101        vbox.Add(note_txt, 0, wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, 10) 
     102        vbox.Add(hbox, 0, wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, 10) 
     103 
    103104        self.SetSizer(vbox) 
    104         #pos = self.parent.GetPosition() 
    105         #self.SetPosition(pos) 
     105 
    106106         
    107107    def OnDefault(self, event=None): 
Note: See TracChangeset for help on using the changeset viewer.