Changeset caf273b in sasview for src/sans/guiframe
- Timestamp:
- Apr 3, 2014 5:03:28 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:
- eea3ffa
- Parents:
- ea67541
- Location:
- src/sans/guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/guiframe/gui_manager.py
r76cd1ae rcaf273b 229 229 """ 230 230 231 PARENT_FRAME.__init__(self, parent=parent, title=title, pos=pos, size=size )231 PARENT_FRAME.__init__(self, parent=parent, title=title, pos=pos, size=size, style=wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX) 232 232 # title 233 233 self.title = title … … 978 978 # Look for plug-in panels 979 979 panels = [] 980 mac_pos_y = 40980 mac_pos_y = 85 981 981 for item in self.plugins: 982 982 if hasattr(item, "get_panels"): … … 1048 1048 win_height = mac_pos_y 1049 1049 if IS_LINUX: 1050 win_height = mac_pos_y + 551050 win_height = mac_pos_y + 10 1051 1051 self.SetMaxSize((-1, win_height)) 1052 1052 else: … … 1239 1239 add toolbar to the frame 1240 1240 """ 1241 #set toolbar 1242 self._toolbar = GUIToolBar(self, -1) 1243 self.SetToolBar(self._toolbar) 1241 # Set toolbar 1242 self._toolbar = GUIToolBar(self) 1243 sizer = wx.BoxSizer(wx.VERTICAL) 1244 sizer.Add(self._toolbar, 0, wx.EXPAND) 1245 self.SetSizer(sizer) 1244 1246 self._update_toolbar_helper() 1245 1247 self._on_toggle_toolbar(event=None) -
src/sans/guiframe/gui_statusbar.py
r5777106 rcaf273b 4 4 from wx.lib import newevent 5 5 import wx.richtext 6 import time7 6 from sans.guiframe.gui_style import GUIFRAME_ICON 8 #numner of fields of the status bar 7 8 # Number of fields on the status bar 9 9 NB_FIELDS = 4 10 10 #position of the status bar's fields … … 14 14 CONSOLE_POSITION = 3 15 15 BUTTON_SIZE = 40 16 16 STATUS_BAR_ICON_SIZE = 12 17 17 CONSOLE_WIDTH = 500 18 18 CONSOLE_HEIGHT = 300 … … 49 49 color = (0, 0, 0) #black 50 50 icon_bmp = wx.ArtProvider.GetBitmap(wx.ART_INFORMATION, 51 51 wx.ART_TOOLBAR) 52 52 if hasattr(event, "info"): 53 53 icon_type = event.info.lower() … … 55 55 color = (0, 0, 255) # blue 56 56 icon_bmp = wx.ArtProvider.GetBitmap(wx.ART_WARNING, 57 57 wx.ART_TOOLBAR) 58 58 if icon_type == "error": 59 59 color = (255, 0, 0) # red … … 70 70 self.msg_txt.EndTextColour() 71 71 72 73 72 74 73 class Console(wx.Frame): … … 84 83 wx.EVT_CLOSE(self, self.Close) 85 84 86 87 85 def set_multiple_messages(self, messages=[]): 88 86 """ … … 112 110 113 111 #Layout of status bar 114 width, height = wx.ArtProvider.GetSizeHint(wx.ART_TOOLBAR) 112 width = STATUS_BAR_ICON_SIZE 113 height = STATUS_BAR_ICON_SIZE 115 114 self.SetFieldsCount(NB_FIELDS) 116 115 # Leave some space for the resize handle in the last field 117 116 self.SetStatusWidths([width+4, -2, -1, width+15]) 118 117 self.SetMinHeight(height) 119 120 rect = self.GetFieldRect(ICON_POSITION)121 if rect.height > height:122 height = rect.GetHeight()123 width = rect.GetWidth()124 118 125 119 #display default message … … 150 144 self.bitmap_bt_console.SetToolTipString(console_hint) 151 145 self.bitmap_bt_console.Bind(wx.EVT_BUTTON, self._onMonitor, 152 146 id=self.bitmap_bt_console.GetId()) 153 147 154 148 self.reposition() … … 174 168 self.frame.set_multiple_messages(self.list_msg) 175 169 self.frame.Hide() 176 self.progress = 0 177 self.timer = wx.Timer(self, -1) 178 self.timer_stop = wx.Timer(self, -1) 170 self.progress = 0 171 self.timer = wx.Timer(self, -1) 172 self.timer_stop = wx.Timer(self, -1) 179 173 self.thread = None 180 174 self.Bind(wx.EVT_TIMER, self._on_time, self.timer) … … 219 213 icon_bmp = wx.ArtProvider.GetBitmap(wx.ART_INFORMATION, wx.ART_TOOLBAR) 220 214 self.bitmap_bt_warning.SetBitmapLabel(icon_bmp) 221 215 222 216 if self.frame is not None : 223 217 self.frame.set_message(status=text, event=event) … … 297 291 298 292 # Get the size of the button images 299 width, height = wx.ArtProvider.GetSizeHint(wx.ART_TOOLBAR) 300 301 # Get the size of the field and choose the size of the 302 # image accordingly 303 rect = self.GetFieldRect(ICON_POSITION) 304 if rect.height > height: 305 height = rect.GetHeight() 306 width = rect.GetWidth() 293 height = STATUS_BAR_ICON_SIZE 307 294 308 295 msg = event.info.lower() … … 340 327 self.SetStatusText(text=str(event.status), event=event) 341 328 342 343 329 def set_gauge(self, event): 344 330 """
Note: See TracChangeset
for help on using the changeset viewer.