Changeset 804a7db in sasview for sansguiframe/src/sans


Ignore:
Timestamp:
May 4, 2012 11:36:50 AM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
3c965fd
Parents:
805bfe9
Message:

try to fix status bar gauge appearance

File:
1 edited

Legend:

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

    rb716dd8 r804a7db  
    11import wx 
     2import sys 
    23from wx import StatusBar as wxStatusB 
    34from wx.lib import newevent 
     
    1516 
    1617CONSOLE_WIDTH = 500 
    17 CONSOLE_HEIGHT = 300 
     18CONSOLE_HEIGHT = 50 
     19if sys.platform.count("win32") > 0: 
     20    FONT_VARIANT = 0 
     21else: 
     22    FONT_VARIANT = 1 
    1823 
    1924class ConsolePanel(wx.Panel): 
     
    7479        kwds["title"] = "Console" 
    7580        wx.Frame.__init__(self, parent=parent, *args, **kwds) 
     81        self.SetWindowVariant(FONT_VARIANT) 
    7682        self.panel = ConsolePanel(self) 
    7783        self.panel.set_message(status=status) 
     
    121127         
    122128        # Create progress bar 
    123         self.gauge = wx.Gauge(self, size=(width, height), 
     129        gauge_width = 5 * width 
     130        self.gauge = wx.Gauge(self, size=(gauge_width, height), 
    124131                               style=wx.GA_HORIZONTAL) 
    125132        self.gauge.Hide() 
     
    330337            self.nb_start += 1 
    331338            #self.timer.Stop() 
    332             self.progress += 10 
     339            self.progress += 5 
    333340            self.gauge.SetValue(int(self.progress))  
    334             self.progress += 10 
     341            self.progress += 5 
    335342            if self.progress < self.gauge.GetRange() - 20: 
    336343                self.gauge.SetValue(int(self.progress))  
     
    340347            self.gauge.Pulse() 
    341348        if type.lower() == "update": 
    342             self.progress += 10 
     349            self.progress += 5 
    343350            if self.progress < self.gauge.GetRange()- 20: 
    344351                self.gauge.SetValue(int(self.progress))    
     
    350357                self.progress = 0 
    351358                self.gauge.SetValue(90)  
    352                 self.timer_stop.Start(3)  
     359                self.timer_stop.Start(5)  
    353360                     
    354361    def set_status(self, event): 
Note: See TracChangeset for help on using the changeset viewer.