Changeset 062ebef in sasview for src/sans/guiframe/startup_configuration.py
- Timestamp:
- Apr 10, 2014 9:58:13 AM (11 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/guiframe/startup_configuration.py
rf7bead2 r062ebef 48 48 except: 49 49 CURRENT_STRINGS = DEFAULT_STRINGS 50 50 FONT_VARIANT = 0 51 51 if sys.platform.count("win32") > 0: 52 52 PANEL_WIDTH = 265 53 53 PANEL_HEIGHT = 235 54 FONT_VARIANT = 055 54 else: 56 55 PANEL_WIDTH = 285 57 PANEL_HEIGHT = 255 58 FONT_VARIANT = 1 56 PANEL_HEIGHT = 215 59 57 60 58 """ … … 77 75 self.return_string = copy.deepcopy(DEFAULT_STRINGS) 78 76 # build layout 79 panel = wx.Panel(self, -1)80 77 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), 84 81 style=wx.RB_GROUP) 85 82 default_bt.Bind(wx.EVT_RADIOBUTTON, self.OnDefault) 86 83 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)) 88 85 current_bt.SetValue(False) 89 86 current_bt.Bind(wx.EVT_RADIOBUTTON, self.OnCurrent) 90 87 msg = "\nThis new configuration will take effect when\n" 91 88 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)) 93 90 note_txt.SetForegroundColour("black") 91 94 92 hbox = wx.BoxSizer(wx.HORIZONTAL) 95 96 93 okButton = wx.Button(self, wx.ID_OK, 'Set', size=(70, 25)) 97 94 closeButton = wx.Button(self,wx.ID_CANCEL, 'Cancel', size=(70, 25)) 98 95 hbox.Add(closeButton, 1, wx.RIGHT, 5) 99 96 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 103 104 self.SetSizer(vbox) 104 #pos = self.parent.GetPosition() 105 #self.SetPosition(pos) 105 106 106 107 107 def OnDefault(self, event=None):
Note: See TracChangeset
for help on using the changeset viewer.