Changeset 9fdf302 in sasview
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/gpu_options.py
r16c1297 r9fdf302 43 43 44 44 clinfo = self._get_clinfo() 45 45 46 self.panel1 = wx.Panel(self, -1) 46 47 static_box1 = wx.StaticBox(self.panel1, -1, "Available OpenCL Options:") 47 48 48 rows = len(clinfo) 49 50 flexsizer = wx.FlexGridSizer(rows, 1, hgap=20, vgap=10) 49 boxsizer = wx.BoxSizer(orient=wx.VERTICAL) 51 50 self.option_button = {} 52 51 for index, fitter in enumerate(clinfo): … … 58 57 self.option_button[fitter] = "None" 59 58 self.Bind(wx.EVT_RADIOBUTTON, self.OnRadio, id=button.GetId()) 60 flexsizer.Add(button, 0, 0)59 boxsizer.Add(button, 0, 0) 61 60 62 61 fit_hsizer = wx.StaticBoxSizer(static_box1, orient=wx.VERTICAL) 63 fit_hsizer.Add( flexsizer, 0, wx.ALL, 5)62 fit_hsizer.Add(boxsizer, 0, wx.ALL, 5) 64 63 65 64 self.panel1.SetSizer(fit_hsizer) … … 72 71 73 72 help_btn = wx.Button(self, wx.ID_HELP, 'Help') 74 #help_btn = wx.Button(self, wx.ID_ANY, 'Help')75 73 help_btn.SetToolTipString("Help on the GPU options") 76 74 77 75 self.Bind(wx.EVT_BUTTON, self.OnAccept, accept_btn) 78 #self.Bind(wx.EVT_BUTTON, self.OnCancel, cancel_btn)79 76 if help is not None: 80 77 self.Bind(wx.EVT_BUTTON, self.OnHelp, help_btn) … … 82 79 self.Bind(wx.EVT_CLOSE, self.OnClose) 83 80 84 # Create the button sizer that will put the buttons in a row, right85 # justified, and with a fixed amount of space between them. This86 # emulates the Windows convention for placing a set of buttons at the87 # bottom right of the window.88 81 btn_sizer = wx.BoxSizer(wx.HORIZONTAL) 89 82 btn_sizer.Add((10,20), 1) # stretchable whitespace 90 83 btn_sizer.Add(accept_btn, 0) 91 #btn_sizer.Add((10,20), 0) # non-stretchable whitespace92 #btn_sizer.Add(cancel_btn, 0)93 #btn_sizer.Add((10,20), 0) # non-stretchable whitespace94 84 btn_sizer.Add((10,20), 0) # non-stretchable whitespace 95 85 btn_sizer.Add(help_btn, 0) … … 98 88 self.vbox.Add(btn_sizer, 0, wx.EXPAND|wx.ALL, 10) 99 89 100 # Finalize the sizer and establish the dimensions of the dialog box.101 # The minimum width is explicitly set because the sizer is not able to102 # take into consideration the width of the enclosing frame's title.103 90 self.SetSizer(self.vbox) 104 #self.vbox.SetMinSize((size[0], -1))105 91 self.vbox.Fit(self) 106 92 … … 128 114 def OnAccept(self, event): 129 115 """ 130 Save the current fitter and options to the fit config.116 Close window on accpetance 131 117 """ 132 118 event.Skip() … … 134 120 def OnHelp(self, event): 135 121 """ 136 Provide help on the selected fitter.122 Provide help on opencl options. 137 123 """ 138 124 _TreeLocation = "user/gpu_computations.html" … … 143 129 def OnClose(self, event): 144 130 """ 145 Don't close the window, just hide it.131 Close window 146 132 """ 147 133 event.Skip()
Note: See TracChangeset
for help on using the changeset viewer.