Ignore:
Timestamp:
Mar 20, 2020 11:51:13 AM (2 years ago)
Author:
srkline
Message:

more changes to panel scaling so that they are viewed properly on a small-screen laptop

File:
1 edited

Legend:

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

    r1242 r1247  
    5252// 
    5353Proc DIV_Setup_Panel() : Panel 
     54 
     55        Variable sc = 1 
     56                         
     57        if(root:Packages:NIST:VSANS:Globals:gLaptopMode == 1) 
     58                sc = 0.7 
     59        endif 
     60 
    5461        PauseUpdate; Silent 1           // building window... 
    55         NewPanel /W=(1207,593,1444,953)/N=DIV_Setup_Panel/K=1 
     62        NewPanel /W=(1207*sc,593*sc,1444*sc,953*sc)/N=DIV_Setup_Panel/K=1 
    5663        DoWindow/C DIV_Setup_Panel 
    57         Button button0,pos={54.00,10.00},size={120.00,20.00},proc=V_DIVSetupButtonProc,title="Setup Folder" 
    58         Button button1,pos={54.00,40.00},size={120.00,20.00},proc=V_DIVClearOldButtonProc,title="Clear Old DIV" 
    59         Button button1_2,pos={54.00,70.00},size={120.00,20.00},proc=V_DIVMaskButtonProc,title="Mask for DIV" 
    60  
    61         DrawText 32,130,"Reduce data for one carriage"   
    62         DrawText 32,200,"Repeat for the other carriage(s)" 
    63          
    64         Button button2,pos={54.00,145.00},size={120.00,20.00},proc=V_DIVCopyButtonProc,title="Copy" 
    65         Button button4,pos={54.00,235.00},size={120.00,20.00},proc=V_DIVNormalizeButtonProc,title="Normalize" 
    66  
    67         DrawText 32,290,"Once data for both (or 3) carriages\rhas been normalized, save the file"        
    68          
    69         Button button3,pos={54.00,300.00},size={120.00,20.00},proc=V_DIVSaveButtonProc,title="Save DIV" 
     64        Button button0,pos={sc*54.00,10.00*sc},size={sc*120.00,20.00*sc},proc=V_DIVSetupButtonProc,title="Setup Folder" 
     65        Button button1,pos={sc*54.00,40.00*sc},size={sc*120.00,20.00*sc},proc=V_DIVClearOldButtonProc,title="Clear Old DIV" 
     66        Button button1_2,pos={sc*54.00,70.00*sc},size={sc*120.00,20.00*sc},proc=V_DIVMaskButtonProc,title="Mask for DIV" 
     67 
     68        SetDrawEnv fsize=12*sc 
     69        DrawText 32*sc,130*sc,"Reduce data for one carriage"     
     70        SetDrawEnv fsize=12*sc 
     71        DrawText 32*sc,200*sc,"Repeat for the other carriage(s)" 
     72         
     73        Button button2,pos={sc*54.00,145.00*sc},size={sc*120.00,20.00*sc},proc=V_DIVCopyButtonProc,title="Copy" 
     74        Button button4,pos={sc*54.00,235.00*sc},size={sc*120.00,20.00*sc},proc=V_DIVNormalizeButtonProc,title="Normalize" 
     75 
     76        SetDrawEnv fsize=12*sc 
     77        DrawText 32*sc,290*sc,"Once data for both (or 3) carriages\rhas been normalized, save the file"  
     78         
     79        Button button3,pos={sc*54.00,300.00*sc},size={sc*120.00,20.00*sc},proc=V_DIVSaveButtonProc,title="Save DIV" 
    7080EndMacro 
    7181 
     
    816826 
    817827Proc V_Display_DIV_Panels() 
     828        Variable sc = 1 
     829                         
     830        if(root:Packages:NIST:VSANS:Globals:gLaptopMode == 1) 
     831                sc = 0.7 
     832        endif 
     833         
    818834        PauseUpdate; Silent 1           // building window... 
    819         NewPanel /W=(720,45,1530,570)/N=VSANS_DIVPanels/K=1 
     835        NewPanel /W=(720*sc,45*sc,1530*sc,570*sc)/N=VSANS_DIVPanels/K=1 
    820836        DoWindow/C VSANS_DIVPanels 
    821837//      ModifyPanel fixedSize=1,noEdit =1 
    822838 
    823839 
    824         PopupMenu popup0,pos={17.00,10.00},size={77.00,23.00},proc=V_DispCarriagePopMenuProc,title="Carriage" 
     840        PopupMenu popup0,pos={sc*17.00,10.00*sc},size={sc*77.00,23.00*sc},proc=V_DispCarriagePopMenuProc,title="Carriage" 
    825841        PopupMenu popup0,mode=1,value= #"\"F;M;B;\"" 
    826         PopupMenu popup1,pos={134.00,10.00},size={68.00,23.00},proc=V_DispFolderPopMenuProc,title="Folder" 
     842        PopupMenu popup1,pos={sc*134.00,10.00*sc},size={sc*68.00,23.00*sc},proc=V_DispFolderPopMenuProc,title="Folder" 
    827843        PopupMenu popup1,mode=1,popvalue="RAW",value= #"\"SAM;EMP;BGD;DIV;COR;CAL;RAW;ABS;STO;SUB;DRK;MSK;ADJ;\"" 
    828         PopupMenu popup2,pos={246.00,10.00},size={83.00,23.00},proc=V_DispOperationPopMenuProc,title="Operation" 
     844        PopupMenu popup2,pos={sc*246.00,10.00*sc},size={sc*83.00,23.00*sc},proc=V_DispOperationPopMenuProc,title="Operation" 
    829845        PopupMenu popup2,mode=1,value= #"\"none;ADJ=STO-SUB;ADJ=STO/SUB;\"" 
    830         Button button0,pos={440.00,10.00},size={70.00,20.00},proc=V_DispUpdateButtonProc,title="Update" 
     846        Button button0,pos={sc*440.00,10.00*sc},size={sc*70.00,20.00*sc},proc=V_DispUpdateButtonProc,title="Update" 
    831847 
    832848 
    833849//      Display/W=(745,45,945,425)/HOST=#  
    834         Display/W=(10,45,210,425)/HOST=#  
     850        Display/W=(10*sc,45*sc,210*sc,425*sc)/HOST=#  
    835851        AppendImage/T/G=1 :Packages:NIST:VSANS:RAW:entry:instrument:detector_FL:data            //  /G=1 flag prevents interpretation as RGB so 3, 4 slices display correctly 
    836852 
     
    850866 
    851867//      Display/W=(1300,45,1500,425)/HOST=#  
    852         Display/W=(565,45,765,425)/HOST=#  
     868        Display/W=(565*sc,45*sc,765*sc,425*sc)/HOST=#  
    853869        AppendImage/T/G=1 :Packages:NIST:VSANS:RAW:entry:instrument:detector_FR:data            //  /G=1 flag prevents interpretation as RGB so 3, 4 slices display correctly 
    854870        ModifyImage data ctab= {*,*,ColdWarm,0} 
     
    867883 
    868884//      Display/W=(945,45,1300,235)/HOST=#  
    869         Display/W=(210,45,565,235)/HOST=#  
     885        Display/W=(210*sc,45*sc,565*sc,235*sc)/HOST=#  
    870886        AppendImage/T/G=1 :Packages:NIST:VSANS:RAW:entry:instrument:detector_FT:data            //  /G=1 flag prevents interpretation as RGB so 3, 4 slices display correctly 
    871887        ModifyImage data ctab= {*,*,ColdWarm,0} 
     
    884900 
    885901//      Display/W=(945,235,1300,425)/HOST=#  
    886         Display/W=(210,235,565,425)/HOST=#  
     902        Display/W=(210*sc,235*sc,565*sc,425*sc)/HOST=#  
    887903        AppendImage/T/G=1 :Packages:NIST:VSANS:RAW:entry:instrument:detector_FB:data            //  /G=1 flag prevents interpretation as RGB so 3, 4 slices display correctly 
    888904        ModifyImage data ctab= {*,*,ColdWarm,0} 
     
    907923         
    908924         
    909         TitleBox title0 pos={15,450},size={112,36},title=root:Packages:NIST:VSANS:Globals:gDIVstr0,fSize=11 
    910         TitleBox title1 pos={300,433},size={112,36},title=root:Packages:NIST:VSANS:Globals:gDIVstr1,fSize=11 
    911         TitleBox title2 pos={300,482},size={112,36},title=root:Packages:NIST:VSANS:Globals:gDIVstr2,fSize=11 
    912         TitleBox title3 pos={580,450},size={112,36},title=root:Packages:NIST:VSANS:Globals:gDIVstr3,fSize=11 
     925        TitleBox title0 pos={sc*15,450*sc},size={sc*112,36*sc},title=root:Packages:NIST:VSANS:Globals:gDIVstr0,fSize=11*sc 
     926        TitleBox title1 pos={sc*300,433*sc},size={sc*112,36*sc},title=root:Packages:NIST:VSANS:Globals:gDIVstr1,fSize=11*sc 
     927        TitleBox title2 pos={sc*300,482*sc},size={sc*112,36*sc},title=root:Packages:NIST:VSANS:Globals:gDIVstr2,fSize=11*sc 
     928        TitleBox title3 pos={sc*580,450*sc},size={sc*112,36*sc},title=root:Packages:NIST:VSANS:Globals:gDIVstr3,fSize=11*sc 
    913929 
    914930 
Note: See TracChangeset for help on using the changeset viewer.