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_FileCatalog.ipf

    r1242 r1246  
    210210         
    211211        numitems = ItemsInList(list,";") 
     212        Variable sc=1 
     213        NVAR gLaptopMode = root:Packages:NIST:VSANS:Globals:gLaptopMode 
     214        if(gLaptopMode == 1) 
     215                sc = 0.7 
     216        endif 
    212217         
    213218        // show a progress bar for filling the file catalog 
    214219        Variable indefinite=0,useIgorDraw=1 
    215         NewPanel /N=ProgressPanel /W=(285,111,739,193) 
    216         ValDisplay valdisp0,win=ProgressPanel,pos={18,32},size={342,18},limits={0,numitems,0},barmisc={0,0} 
     220        NewPanel /N=ProgressPanel /W=(285*sc,111*sc,739*sc,193*sc) 
     221        ValDisplay valdisp0,win=ProgressPanel,pos={sc*18,32*sc},size={sc*342,18*sc},limits={0,numitems,0},barmisc={0,0} 
    217222        ValDisplay valdisp0,win=ProgressPanel,value= _NUM:0 
    218         DrawText 20,24,"Refreshing file catalog... Please Wait..." 
     223        DrawText 20*sc,24*sc,"Refreshing file catalog... Please Wait..." 
    219224 
    220225        if( indefinite ) 
     
    226231                ValDisplay valdisp0,win=ProgressPanel,highColor=(49535,1000,1000)               //(0,65535,0) 
    227232        endif 
    228         Button bStop,win=ProgressPanel,pos={375,32},size={50,20},title="Stop" 
     233        Button bStop,win=ProgressPanel,pos={sc*375,32*sc},size={sc*50,20*sc},title="Stop" 
    229234        DoUpdate /W=ProgressPanel /E=1  // mark this as our progress window 
    230235         
     
    721726         
    722727        print "Creating CAT Sort-Panel..." 
     728 
     729        Variable sc = 1 
     730         
     731        NVAR gLaptopMode = root:Packages:NIST:VSANS:Globals:gLaptopMode 
     732                 
     733        if(gLaptopMode == 1) 
     734                sc = 0.7 
     735        endif 
    723736                 
    724737        //PauseUpdate 
    725         NewPanel /W=(600,360,790,730)/K=1 as "CAT - Sort Panel" 
     738        NewPanel /W=(600*sc,360*sc,790*sc,730*sc)/K=1 as "CAT - Sort Panel" 
    726739        DoWindow/C CatSortPanel 
    727740        ModifyPanel fixedSize=1, cbRGB = (42919, 53970, 60909) 
    728741         
    729         Button SortFilenamesButton,             pos={25, 8},            size={140,24},proc=V_CatVSANSTable_SortProc,title="Filenames" 
    730         Button SortLabelsButton,                        pos={25,38},            size={140,24},proc=V_CatVSANSTable_SortProc,title="Labels" 
    731         Button SortDateAndTimeButton,   pos={25,68},            size={140,24},proc=V_CatVSANSTable_SortProc,title="Date and Time" 
    732         Button SortIntentButton,                        pos={25,98},            size={140,24},proc=V_CatVSANSTable_SortProc,title="Intent" 
    733         Button SortPurposeButton,               pos={25,128},   size={140,24},proc=V_CatVSANSTable_SortProc,title="Purpose" 
    734         Button SortIDButton,                    pos={25,158},   size={140,24},proc=V_CatVSANSTable_SortProc,title="Group ID" 
    735         Button SortLambdaButton,                        pos={25,188},   size={140,24},proc=V_CatVSANSTable_SortProc,title="Lambda" 
    736         Button SortCountTimButton,              pos={25,218},   size={140,24},proc=V_CatVSANSTable_SortProc,title="Count Time" 
    737         Button SortSDDFButton,          pos={25,248},   size={140,24},proc=V_CatVSANSTable_SortProc,title="SDD F" 
    738         Button SortCountRateFButton,            pos={25,278},   size={140,24},proc=V_CatVSANSTable_SortProc,title="Count Rate F" 
    739         Button SortMonitorCountsButton, pos={25,308},   size={140,24},proc=V_CatVSANSTable_SortProc,title="Monitor Counts" 
    740         Button SortTransmissionButton,  pos={25,338},   size={140,24},proc=V_CatVSANSTable_SortProc,title="Transmission" 
     742        Button SortFilenamesButton,             pos={sc*25, 8*sc},              size={sc*140,24*sc},proc=V_CatVSANSTable_SortProc,title="Filenames" 
     743        Button SortLabelsButton,                        pos={sc*25,38*sc},              size={sc*140,24*sc},proc=V_CatVSANSTable_SortProc,title="Labels" 
     744        Button SortDateAndTimeButton,   pos={sc*25,68*sc},              size={sc*140,24*sc},proc=V_CatVSANSTable_SortProc,title="Date and Time" 
     745        Button SortIntentButton,                        pos={sc*25,98*sc},              size={sc*140,24*sc},proc=V_CatVSANSTable_SortProc,title="Intent" 
     746        Button SortPurposeButton,               pos={sc*25,128*sc},     size={sc*140,24*sc},proc=V_CatVSANSTable_SortProc,title="Purpose" 
     747        Button SortIDButton,                    pos={sc*25,158*sc},     size={sc*140,24*sc},proc=V_CatVSANSTable_SortProc,title="Group ID" 
     748        Button SortLambdaButton,                        pos={sc*25,188*sc},     size={sc*140,24*sc},proc=V_CatVSANSTable_SortProc,title="Lambda" 
     749        Button SortCountTimButton,              pos={sc*25,218*sc},     size={sc*140,24*sc},proc=V_CatVSANSTable_SortProc,title="Count Time" 
     750        Button SortSDDFButton,          pos={sc*25,248*sc},     size={sc*140,24*sc},proc=V_CatVSANSTable_SortProc,title="SDD F" 
     751        Button SortCountRateFButton,            pos={sc*25,278*sc},     size={sc*140,24*sc},proc=V_CatVSANSTable_SortProc,title="Count Rate F" 
     752        Button SortMonitorCountsButton, pos={sc*25,308*sc},     size={sc*140,24*sc},proc=V_CatVSANSTable_SortProc,title="Monitor Counts" 
     753        Button SortTransmissionButton,  pos={sc*25,338*sc},     size={sc*140,24*sc},proc=V_CatVSANSTable_SortProc,title="Transmission" 
    741754 
    742755end 
Note: See TracChangeset for help on using the changeset viewer.