Changeset dee3d27 in sasview
- Timestamp:
- Apr 23, 2010 4:40:51 PM (15 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:
- 3d01a1e
- Parents:
- 4d27f9a4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/statusbar.py
r5318c4c rdee3d27 67 67 self.SetFieldsCount(NB_FIELDS) 68 68 self.SetStatusWidths([BUTTON_SIZE, -2, -1,BUTTON_SIZE]) 69 69 70 70 #display default message 71 71 self.msg_position = MSG_POSITION … … 75 75 self.gauge = wx.Gauge(self, size=(width/10,height-3), 76 76 style= wx.GA_HORIZONTAL) 77 rect = self.GetFieldRect(GAUGE_POSITION) 78 self.gauge.SetPosition((rect.x+5, rect.y-2)) 77 79 78 self.gauge.Hide() 80 79 … … 82 81 self.bitmap_bt_warning = wx.BitmapButton(self, -1, size=(BUTTON_SIZE,-1), 83 82 style=wx.NO_BORDER) 84 rect = self.GetFieldRect(ICON_POSITION)85 self.bitmap_bt_warning.SetPosition((rect.x+5, rect.y-2))86 87 83 console_bmp = wx.ArtProvider.GetBitmap(wx.ART_TIP, wx.ART_TOOLBAR) 88 84 self.bitmap_bt_console = wx.BitmapButton(self, -1, 89 85 size=(BUTTON_SIZE-5, height-4)) 90 86 self.bitmap_bt_console.SetBitmapLabel(console_bmp) 91 87 console_hint = "History of status bar messages" … … 93 89 self.bitmap_bt_console.Bind(wx.EVT_BUTTON, self._onMonitor, 94 90 id=self.bitmap_bt_console.GetId()) 95 rect = self.GetFieldRect(CONSOLE_POSITION) 96 self.bitmap_bt_console.SetPosition((rect.x+5, rect.y-2)) 91 self.reposition() 97 92 ## Current progress value of the bar 98 93 self.nb_start = 0 … … 108 103 self.Bind(wx.EVT_TIMER,self.OnTimer, self.timer) 109 104 self.Bind(wx.EVT_TIMER,self.OnTimer_stop, self.timer_stop) 105 self.Bind(wx.EVT_SIZE, self.OnSize) 106 self.Bind(wx.EVT_IDLE, self.OnIdle) 107 108 def reposition(self): 109 """ 110 """ 111 rect = self.GetFieldRect(GAUGE_POSITION) 112 self.gauge.SetPosition((rect.x+5, rect.y-2)) 113 rect = self.GetFieldRect(ICON_POSITION) 114 self.bitmap_bt_warning.SetPosition((rect.x+5, rect.y-2)) 115 rect = self.GetFieldRect(CONSOLE_POSITION) 116 self.bitmap_bt_console.SetPosition((rect.x-5, rect.y-2)) 117 self.sizeChanged = False 118 119 def OnIdle(self, event): 120 if self.sizeChanged: 121 self.reposition() 122 123 def OnSize(self, evt): 124 self.reposition() 125 self.sizeChanged = True 110 126 111 127 def get_msg_position(self):
Note: See TracChangeset
for help on using the changeset viewer.