Changeset 55b935e in sasview
- Timestamp:
- Jan 10, 2017 8:19:37 AM (8 years ago)
- Children:
- 4ba4b69, 755ecb0
- Parents:
- 51cc0eb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/gpu_options.py
r51cc0eb r55b935e 20 20 wx.Dialog.__init__(self, parent, title=title) 21 21 22 panel = wx.Panel(self, -1) 23 static_box = wx.StaticBox(panel, -1, "OpenCL test completed!") 24 boxsizer = wx.BoxSizer(orient=wx.VERTICAL) 25 26 text = wx.TextCtrl(self, style=wx.TE_READONLY|wx.TE_MULTILINE 27 |wx.BORDER_NONE, size=(400,300)) 28 text.SetValue(msg) 29 text.SetBackgroundColour(self.GetBackgroundColour()) 30 31 boxsizer.Add(text, 0) 32 33 fit_hsizer = wx.StaticBoxSizer(static_box, orient=wx.VERTICAL) 34 fit_hsizer.Add(boxsizer, 0, wx.ALL, 5) 35 36 panel.SetSizer(fit_hsizer) 37 38 vbox = wx.BoxSizer(wx.VERTICAL) 39 vbox.Add(panel, 0, wx.ALL, 10) 40 41 message_text = wx.StaticText(self, -1,"If tests fail on OpenCL devices, " 22 self.panel = wx.Panel(self, -1) 23 self.static_box = wx.StaticBox(self.panel, -1, "OpenCL test completed!") 24 self.boxsizer = wx.BoxSizer(orient=wx.VERTICAL) 25 26 self.text = wx.TextCtrl(self, -1, size=(500, 400), 27 style=wx.TE_MULTILINE|wx.TE_READONLY 28 |wx.SUNKEN_BORDER|wx.HSCROLL) 29 self.text.SetValue(msg) 30 self.text.SetBackgroundColour(self.GetBackgroundColour()) 31 32 self.boxsizer.Add(self.text, proportion=1, flag=wx.EXPAND) 33 34 self.fit_hsizer = wx.StaticBoxSizer(self.static_box, orient=wx.VERTICAL) 35 self.fit_hsizer.Add(self.boxsizer, 0, wx.ALL, 5) 36 37 self.panel.SetSizer(self.fit_hsizer) 38 39 self.vbox = wx.BoxSizer(wx.VERTICAL) 40 self.vbox.Add(self.panel, 0, wx.ALL, 10) 41 42 self.message_text = wx.StaticText(self, -1,"If tests fail on OpenCL devices, " 42 43 "please select No OpenCL option.\n\n" 43 44 "In case of large number of failing tests, " … … 45 46 "report to help@sasview.org.") 46 47 47 message_text.SetFont(wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, ""))48 vbox.Add(message_text, 0, wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 10)49 50 ok_btn = wx.Button(self, wx.ID_OK)51 52 btn_sizer = wx.BoxSizer(wx.HORIZONTAL)53 btn_sizer.Add((10, 20), 1) # stretchable whitespace54 btn_sizer.Add(ok_btn, 0)55 56 vbox.Add(btn_sizer, 0, wx.EXPAND|wx.ALL, 10)57 58 self.SetSizer( vbox)59 vbox.Fit(self)48 self.message_text.SetFont(wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.NORMAL, 0, "")) 49 self.vbox.Add(self.message_text, 0, wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 10) 50 51 self.ok_btn = wx.Button(self, wx.ID_OK) 52 53 self.btn_sizer = wx.BoxSizer(wx.HORIZONTAL) 54 self.btn_sizer.Add((10, 20), 1) # stretchable whitespace 55 self.btn_sizer.Add(self.ok_btn, 0) 56 57 self.vbox.Add(self.btn_sizer, 0, wx.EXPAND|wx.ALL, 10) 58 59 self.SetSizer(self.vbox) 60 self.vbox.Fit(self) 60 61 61 62 self.Centre()
Note: See TracChangeset
for help on using the changeset viewer.