Changeset 6e4d543 in sasview for sansguiframe/src/sans/guiframe
- Timestamp:
- Apr 19, 2012 9:48:04 AM (13 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:
- 9690fbf
- Parents:
- b1432b9
- Location:
- sansguiframe/src/sans/guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/gui_manager.py
rb1432b9 r6e4d543 728 728 self._mgr = wx.aui.AuiManager(self, flags=default_flag) 729 729 self._mgr.SetDockSizeConstraint(0.5, 0.5) 730 # border color731 #self.b_color = wx.aui.AUI_DOCKART_BORDER_COLOUR732 #self._mgr.GetArtProvider().SetColor(self.b_color, self.color)733 #self._mgr.SetArtProvider(wx.aui.AuiDockArt(wx.AuiDefaultDockArt))734 #print "set", self._dockart.GetColour(13)735 730 # Load panels 736 731 self._load_panels() -
sansguiframe/src/sans/guiframe/gui_statusbar.py
r6184b4e r6e4d543 98 98 class StatusBar(wxStatusB): 99 99 """ 100 """ 101 def __init__(self, parent, *args, **kargs): 102 wxStatusB.__init__(self, parent, *args, **kargs) 103 """ 104 Implement statusbar functionalities 105 """ 100 Application status bar 101 """ 102 def __init__(self, parent, id): 103 wxStatusB.__init__(self, parent, id) 106 104 self.parent = parent 107 105 self.parent.SetStatusBarPane(MSG_POSITION) 106 108 107 #Layout of status bar 108 hint_w, hint_h = wx.ArtProvider.GetSizeHint(wx.ART_TOOLBAR) 109 109 self.SetFieldsCount(NB_FIELDS) 110 self.SetStatusWidths([BUTTON_SIZE, -2, -1, BUTTON_SIZE]) 110 # Leave some space for the resize handle in the last field 111 self.SetStatusWidths([hint_w+4, -2, -1, hint_w+15]) 112 self.SetMinHeight(hint_h+4) 113 111 114 #display default message 112 115 self.msg_position = MSG_POSITION 113 #save the position of the gauge114 width, height = self.GetSize()115 self.gauge = wx.Gauge(self, size=( width/10, height-3),116 117 # Create progress bar 118 self.gauge = wx.Gauge(self, size=(hint_w, hint_h), 116 119 style=wx.GA_HORIZONTAL) 117 120 self.gauge.Hide() 118 #status bar icon 121 122 # Create status bar icon reflecting the type of status 123 # for the last message 119 124 self.bitmap_bt_warning = wx.BitmapButton(self, -1, 120 size=(BUTTON_SIZE,-1), 121 style=wx.NO_BORDER) 122 console_bmp = wx.ArtProvider.GetBitmap(wx.ART_TIP, wx.ART_TOOLBAR, 123 size = (16,16)) 125 size=(hint_w, hint_h), 126 style=wx.NO_BORDER) 127 128 # Create the button used to show the console dialog 129 console_bmp = wx.ArtProvider.GetBitmap(wx.ART_INFORMATION, wx.ART_TOOLBAR, 130 size = (hint_w, hint_h)) 124 131 self.bitmap_bt_console = wx.BitmapButton(self, -1, 125 size=(BUTTON_SIZE-5, height-4)) 132 size=(hint_w, hint_h), 133 style=wx.NO_BORDER) 126 134 self.bitmap_bt_console.SetBitmapLabel(console_bmp) 127 135 console_hint = "History of status bar messages" … … 165 173 """ 166 174 rect = self.GetFieldRect(GAUGE_POSITION) 167 self.gauge.SetPosition((rect.x + 5, rect.y))175 self.gauge.SetPosition((rect.x, rect.y)) 168 176 rect = self.GetFieldRect(ICON_POSITION) 169 self.bitmap_bt_warning.SetPosition((rect.x + 5, rect.y))177 self.bitmap_bt_warning.SetPosition((rect.x, rect.y)) 170 178 rect = self.GetFieldRect(CONSOLE_POSITION) 171 self.bitmap_bt_console.SetPosition((rect.x - 5, rect.y))179 self.bitmap_bt_console.SetPosition((rect.x, rect.y)) 172 180 self.sizeChanged = False 173 181 … … 269 277 if not hasattr(event, "info"): 270 278 return 279 280 rect = self.GetFieldRect(ICON_POSITION) 281 width = rect.GetWidth() 282 height = rect.GetHeight() 283 271 284 msg = event.info.lower() 272 285 if msg == "warning": 273 icon_bmp = wx.ArtProvider.GetBitmap(wx.ART_WARNING, wx.ART_TOOLBAR) 286 icon_bmp = wx.ArtProvider.GetBitmap(wx.ART_WARNING, wx.ART_TOOLBAR, 287 size = (height,height)) 274 288 self.bitmap_bt_warning.SetBitmapLabel(icon_bmp) 275 if msg == "error": 276 icon_bmp = wx.ArtProvider.GetBitmap(wx.ART_ERROR, wx.ART_TOOLBAR) 289 elif msg == "error": 290 icon_bmp = wx.ArtProvider.GetBitmap(wx.ART_ERROR, wx.ART_TOOLBAR, 291 size = (height,height)) 277 292 self.bitmap_bt_warning.SetBitmapLabel(icon_bmp) 278 if msg == "info":293 else: 279 294 icon_bmp = wx.ArtProvider.GetBitmap(wx.ART_INFORMATION, 280 wx.ART_TOOLBAR) 295 wx.ART_TOOLBAR, 296 size = (height,height)) 281 297 self.bitmap_bt_warning.SetBitmapLabel(icon_bmp) 282 298
Note: See TracChangeset
for help on using the changeset viewer.