Changeset 519c693 in sasview for guiframe/local_perspectives/plotting
- Timestamp:
- Nov 16, 2010 6:41:15 AM (14 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:
- effce1d
- Parents:
- 1db4a53
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/profile_dialog.py
r6996942 r519c693 14 14 15 15 #SLD panel size 16 if sys.platform.count("win32") >0:16 if sys.platform.count("win32") > 0: 17 17 _STATICBOX_WIDTH = 570 18 18 PANEL_SIZE = 475 19 19 FONT_VARIANT = 0 20 20 else: 21 _STATICBOX_WIDTH = 81022 PANEL_SIZE = 50 521 _STATICBOX_WIDTH = 610 22 PANEL_SIZE = 500 23 23 FONT_VARIANT = 1 24 24 … … 40 40 kwds["size"] = wx.Size(_STATICBOX_WIDTH,PANEL_SIZE) 41 41 wx.Dialog.__init__(self, parent, id = id, *args, **kwds) 42 42 43 if data != None: 43 44 … … 56 57 # Panel for plot 57 58 self.plotpanel = SLDplotpanel(self, axes, -1, 58 style =wx.TRANSPARENT_WINDOW)59 style = wx.TRANSPARENT_WINDOW) 59 60 self.cmap = DEFAULT_CMAP 60 61 ## Create Artist and bind it … … 71 72 self.Centre() 72 73 self.Layout() 74 73 75 74 76 def _set_dy_data(self): … … 86 88 Set up the layout 87 89 """ 88 # panel 89 sizer = wx.GridBagSizer(14,14) 90 91 sizer.Add(self.plotpanel,(0, 0), (13, 13), 92 wx.EXPAND | wx.LEFT| wx.RIGHT, 1) 93 90 # panel sizer 91 sizer = wx.BoxSizer(wx.VERTICAL) 92 sizer.Add(self.plotpanel,-1, wx.LEFT|wx.RIGHT, 5) 93 sizer.Add((0,10)) 94 94 #-----Button------------1 95 95 id = wx.NewId() … … 98 98 button_reset.Bind(wx.EVT_BUTTON, self._close, 99 99 id = button_reset.GetId()) 100 sizer.Add(button_reset, (13, 12), flag=wx.RIGHT | wx.BOTTOM, border=15) 101 102 sizer.AddGrowableCol(2) 103 sizer.AddGrowableRow(3) 100 sizer.Add(button_reset, 0, wx.LEFT, _STATICBOX_WIDTH - 80) 101 sizer.Add((0,10)) 102 104 103 self.SetSizerAndFit(sizer) 105 button_reset.SetFocus()104 106 105 self.Centre() 107 106 self.Show(True) 108 107 button_reset.SetFocus() 108 109 109 def _close(self, event): 110 110 """ … … 136 136 Panel 137 137 """ 138 def __init__(self, parent,axes =[], id = -1, color = None, dpi = None,138 def __init__(self, parent,axes = [], id = -1, color = None, dpi = None, 139 139 **kwargs): 140 140 """ 141 141 """ 142 PlotPanel.__init__(self, parent, id=id, xtransform='x', ytransform='y', 143 color=color, dpi=dpi, **kwargs) 142 PlotPanel.__init__(self, parent, id=id, xtransform = 'x', ytransform = 'y', 143 color = color, dpi = dpi, 144 size = (_STATICBOX_WIDTH, PANEL_SIZE-100), **kwargs) 145 144 146 # Keep track of the parent Frame 145 147 self.parent = parent … … 149 151 self.graph = Graph() 150 152 self.axes_label = [] 151 for idx in range(0, len(axes)):153 for idx in range(0, len(axes)): 152 154 self.axes_label.append(axes[idx]) 153 155 … … 199 201 # Initialize the Frame object 200 202 wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition, 201 wx.Size( 950,850))203 wx.Size(_STATICBOX_WIDTH,PANEL_SIZE)) 202 204 203 205 # Panel for 1D plot 204 self.plotpanel = SLDplotpanel(self, -1, style =wx.RAISED_BORDER)206 self.plotpanel = SLDplotpanel(self, -1, style = wx.RAISED_BORDER) 205 207 206 208 class ViewApp(wx.App):
Note: See TracChangeset
for help on using the changeset viewer.