Changeset b716dd8 in sasview


Ignore:
Timestamp:
Apr 19, 2012 10:39:43 AM (12 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
9130227
Parents:
0ea247e
Message:

trying to improve the status bar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/gui_statusbar.py

    ra781312 rb716dd8  
    106106 
    107107        #Layout of status bar 
    108         hint_w, hint_h = wx.ArtProvider.GetSizeHint(wx.ART_TOOLBAR)         
     108        width, height = wx.ArtProvider.GetSizeHint(wx.ART_TOOLBAR)         
    109109        self.SetFieldsCount(NB_FIELDS)  
    110110        # 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) 
     111        self.SetStatusWidths([width+4, -2, -1, width+15]) 
     112        self.SetMinHeight(height) 
    113113         
    114114        rect = self.GetFieldRect(ICON_POSITION) 
    115         if rect.height > hint_h: 
    116             hint_h = rect.height 
    117             hint_w = rect.width 
     115        if rect.height > height: 
     116            height = rect.GetHeight()   
     117            width = rect.GetWidth() 
    118118         
    119119        #display default message 
     
    121121         
    122122        # Create progress bar 
    123         self.gauge = wx.Gauge(self, size=(hint_w, hint_h), 
     123        self.gauge = wx.Gauge(self, size=(width, height), 
    124124                               style=wx.GA_HORIZONTAL) 
    125125        self.gauge.Hide() 
     
    129129        self.bitmap_bt_warning = \ 
    130130            wx.BitmapButton(self, -1, 
    131                             size=(hint_w, hint_h), 
     131                            size=(width, height), 
    132132                            style=wx.NO_BORDER) 
    133133                 
     
    135135        console_bmp = wx.ArtProvider.GetBitmap(wx.ART_INFORMATION,  
    136136                                               wx.ART_TOOLBAR, 
    137                                                size = (hint_w, hint_h)) 
     137                                               size = (width, height)) 
    138138        self.bitmap_bt_console = wx.BitmapButton(self, -1,  
    139                                  size=(hint_w, hint_h), 
     139                                 size=(width, height), 
    140140                                 style=wx.NO_BORDER) 
    141141        self.bitmap_bt_console.SetBitmapLabel(console_bmp) 
     
    178178    def reposition(self): 
    179179        """ 
     180            Place the various fields in their proper position 
    180181        """ 
    181182        rect = self.GetFieldRect(GAUGE_POSITION) 
     
    285286            return  
    286287         
     288        # Get the size of the button images 
     289        width, height = wx.ArtProvider.GetSizeHint(wx.ART_TOOLBAR)         
     290 
     291        # Get the size of the field and choose the size of the  
     292        # image accordingly 
    287293        rect = self.GetFieldRect(ICON_POSITION) 
    288         width = rect.GetWidth() 
    289         height = rect.GetHeight()   
     294        if rect.height > height: 
     295            height = rect.GetHeight() 
     296            width = rect.GetWidth() 
    290297         
    291298        msg = event.info.lower() 
Note: See TracChangeset for help on using the changeset viewer.