Ignore:
Timestamp:
Mar 19, 2020 4:35:21 PM (2 years ago)
Author:
srkline
Message:

A large number of changes to the size of panels to enable "Laptop Mode" where all of the panels and controls are scaled down so that they fit on screen and are still in correct proportion. For the laptop I'm using for testing, the resolution is 1920x1080. For this, a scaling of 0.7 seems to work. The on/off of the "laptop Mode" is controlled by a checkbox in the preference panel (under the General tab).

There are still more panels to update in the next commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Utilities_General.ipf

    r1243 r1246  
    178178        // there are some folders to kill, so proceed 
    179179         
    180         NewPanel /N=ProgressPanel /W=(285,111,739,193) 
    181         ValDisplay valdisp0,win=ProgressPanel,pos={18,32},size={342,18},limits={0,num,0},barmisc={0,0} 
     180        Variable sc = 1 
     181         
     182        NVAR gLaptopMode = root:Packages:NIST:VSANS:Globals:gLaptopMode 
     183                 
     184        if(gLaptopMode == 1) 
     185                sc = 0.7 
     186        endif 
     187         
     188        NewPanel /N=ProgressPanel /W=(285*sc,111*sc,739*sc,193*sc) 
     189        ValDisplay valdisp0,win=ProgressPanel,pos={sc*18,32*sc},size={sc*342,18*sc},limits={0,num,0},barmisc={0,0} 
    182190        ValDisplay valdisp0,win=ProgressPanel,value= _NUM:0 
    183         DrawText 20,24,"Cleaning up old files... Please Wait..." 
     191        DrawText 20*sc,24*sc,"Cleaning up old files... Please Wait..." 
    184192         
    185193        if( indefinite ) 
     
    191199                ValDisplay valdisp0,win=ProgressPanel,highColor=(15000,45535,15000)             //(0,65535,0) 
    192200        endif 
    193         Button bStop,win=ProgressPanel,pos={375,32},size={50,20},title="Stop" 
     201        Button bStop,win=ProgressPanel,pos={sc*375,32*sc},size={sc*50,20*sc},title="Stop" 
    194202        DoUpdate /W=ProgressPanel /E=1  // mark this as our progress window 
    195203 
Note: See TracChangeset for help on using the changeset viewer.