Changeset 2ad3601 in sasview


Ignore:
Timestamp:
May 7, 2012 7:49:21 PM (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:
6306f2f
Parents:
3764dbd7
Message:

starup_config supports full max screen size

Location:
sansguiframe/src/sans/guiframe
Files:
2 edited

Legend:

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

    r6b53d2e r2ad3601  
    33493349        When initialised 
    33503350        """ 
    3351         pos, size = self.window_placement((GUIFRAME_WIDTH,  
     3351        pos, size, self.is_max = self.window_placement((GUIFRAME_WIDTH,  
    33523352                                           GUIFRAME_HEIGHT))      
    33533353        self.frame = ViewerFrame(parent=None,  
     
    33853385   
    33863386        return True 
     3387     
     3388    def maximize_win(self): 
     3389        """ 
     3390        Maximize the window after the frame shown 
     3391        """ 
     3392        if self.is_max: 
     3393            if self.frame.IsShown(): 
     3394                # Max window size 
     3395                self.frame.Maximize(self.is_max) 
    33873396 
    33883397    def open_file(self): 
     
    34723481        placed on the left side of the screen. 
    34733482        """ 
    3474          
     3483        is_maximized = False 
    34753484        # Get size of screen without  
    34763485        for screenCount in range(wx.Display().GetCount()): 
     
    34843493         
    34853494        # If the custom size is default, set 90% of the screen size 
    3486         if customWidth < 0 and customHeight < 0: 
     3495        if customWidth <= 0 and customHeight <= 0: 
     3496            if customWidth == 0 and customHeight == 0: 
     3497                is_maximized = True 
    34873498            customWidth = displayWidth * 0.9 
    34883499            customHeight = displayHeight * 0.9 
     
    35163527         
    35173528        # Return the suggested position and size for the application frame.     
    3518         return (posX, posY), (customWidth, customHeight) 
     3529        return (posX, posY), (customWidth, customHeight), is_maximized 
    35193530 
    35203531     
     
    35623573        self.frame.Show(True) 
    35633574        event.Skip() 
     3575        self.maximize_win() 
    35643576 
    35653577if __name__ == "__main__":  
  • sansguiframe/src/sans/guiframe/startup_configuration.py

    rbf0acea r2ad3601  
    117117        """ 
    118118        event.Skip() 
    119          
    120         gui_pw, gui_ph = self.parent.GetSizeTuple() 
     119        if self.parent.IsMaximized(): 
     120            gui_pw, gui_ph = (0, 0) 
     121        else: 
     122            gui_pw, gui_ph = self.parent.GetSizeTuple() 
    121123        self.current_string['GUIFRAME_WIDTH'] = gui_pw 
    122124        self.current_string['GUIFRAME_HEIGHT'] = gui_ph 
Note: See TracChangeset for help on using the changeset viewer.