Changeset b50b057 in sasview
- Timestamp:
- Apr 5, 2014 7:24:36 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:
- caf8dd4
- Parents:
- 1c03e14
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/guiframe/gui_statusbar.py
rbeda555 rb50b057 21 21 else: 22 22 FONT_VARIANT = 1 23 24 GREEN = wx.Colour(95, 190, 95) 25 YELLOW = wx.Colour(247, 214, 49) 26 RED = wx.Colour(234, 89, 78) 23 27 24 28 class ConsolePanel(wx.Panel): … … 129 133 # Create status bar icon reflecting the type of status 130 134 # for the last message 131 self.bitmap_bt_warning = \ 132 wx.BitmapButton(self, -1, 133 size=(width, height), 134 style=wx.NO_BORDER) 135 self.bitmap_bt_warning = wx.Button(self, wx.NewId(), "", 136 size=(width, height), style=wx.NO_BORDER) 137 self.bitmap_bt_warning.SetBackgroundColour(GREEN) 135 138 136 139 # Create the button used to show the console dialog 137 self. bitmap_bt_console= wx.Button(self, wx.NewId(), "Console",140 self.console_button = wx.Button(self, wx.NewId(), "Console", 138 141 size=(console_btn_width, 10), 139 142 style=wx.BU_EXACTFIT) 140 font = self.bitmap_bt_console.GetFont() 141 font = font.Smaller() 142 self.bitmap_bt_console.SetFont(font) 143 144 console_hint = "History of status bar messages" 145 self.bitmap_bt_console.SetToolTipString(console_hint) 146 self.bitmap_bt_console.Bind(wx.EVT_BUTTON, self._onMonitor, 147 id=self.bitmap_bt_console.GetId()) 143 font = self.console_button.GetFont() 144 font.SetPixelSize(wx.Size(0,10)) 145 self.console_button.SetFont(font) 146 self.console_button.SetToolTipString("History of status bar messages") 147 self.console_button.Bind(wx.EVT_BUTTON, self._onMonitor, 148 id=self.console_button.GetId()) 148 149 149 150 self.reposition() … … 187 188 self.bitmap_bt_warning.SetPosition((rect.x, rect.y)) 188 189 rect = self.GetFieldRect(CONSOLE_POSITION) 189 self. bitmap_bt_console.SetPosition((rect.x, rect.y))190 self.console_button.SetPosition((rect.x, rect.y)) 190 191 self.sizeChanged = False 191 192 … … 212 213 wxStatusB.SetStatusText(self, text, number) 213 214 self.list_msg.append(text) 214 icon_bmp = wx.ArtProvider.GetBitmap(wx.ART_INFORMATION, wx.ART_TOOLBAR) 215 self.bitmap_bt_warning.SetBitmapLabel(icon_bmp) 215 self.bitmap_bt_warning.SetBackgroundColour(GREEN) 216 216 217 217 if self.frame is not None : … … 296 296 msg = event.info.lower() 297 297 if msg == "warning": 298 icon_bmp = wx.ArtProvider.GetBitmap(wx.ART_WARNING, wx.ART_TOOLBAR, 299 size = (height,height)) 300 self.bitmap_bt_warning.SetBitmapLabel(icon_bmp) 298 self.bitmap_bt_warning.SetBackgroundColour(YELLOw) 301 299 elif msg == "error": 302 icon_bmp = wx.ArtProvider.GetBitmap(wx.ART_ERROR, wx.ART_TOOLBAR, 303 size = (height,height)) 304 self.bitmap_bt_warning.SetBitmapLabel(icon_bmp) 300 self.bitmap_bt_warning.SetBackgroundColour(RED) 305 301 else: 306 icon_bmp = wx.ArtProvider.GetBitmap(wx.ART_INFORMATION, 307 wx.ART_TOOLBAR, 308 size = (height,height)) 309 self.bitmap_bt_warning.SetBitmapLabel(icon_bmp) 302 self.bitmap_bt_warning.SetBackgroundColour(GREEN) 310 303 311 304 def set_dialog(self, event):
Note: See TracChangeset
for help on using the changeset viewer.