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

    r1242 r1246  
    5959        PauseUpdate; Silent 1           // building window... 
    6060 
    61  
    62         NewPanel /W=(662,418,1586,960)/N=IsolateDetector /K=1 
     61        Variable sc = 1 
     62                         
     63        if(root:Packages:NIST:VSANS:Globals:gLaptopMode == 1) 
     64                sc = 0.7 
     65        endif 
     66 
     67        NewPanel /W=(662*sc,418*sc,1586*sc,960*sc)/N=IsolateDetector /K=1 
    6368//      ShowTools/A 
    6469         
    65         PopupMenu popup_0,pos={169,18},size={109,20},proc=V_isoSetDetPanelPopMenuProc,title="Detector Panel" 
     70        PopupMenu popup_0,pos={sc*169,18*sc},size={sc*109,20*sc},proc=V_isoSetDetPanelPopMenuProc,title="Detector Panel" 
    6671        PopupMenu popup_0,mode=1,popvalue="FL",value= #"\"FL;FR;FT;FB;ML;MR;MT;MB;B;\"" 
    67 //      PopupMenu popup_1,pos={200,20},size={157,20},proc=DetModelPopMenuProc,title="Model Function" 
     72//      PopupMenu popup_1,pos={sc*200,20*sc},size={sc*157,20*sc},proc=DetModelPopMenuProc,title="Model Function" 
    6873//      PopupMenu popup_1,mode=1,popvalue="BroadPeak",value= #"\"BroadPeak;other;\"" 
    69         PopupMenu popup_2,pos={20,18},size={109,20},title="Data Source",proc=V_SetFldrPopMenuProc 
     74        PopupMenu popup_2,pos={sc*20,18*sc},size={sc*109,20*sc},title="Data Source",proc=V_SetFldrPopMenuProc 
    7075        PopupMenu popup_2,mode=1,popvalue="RAW",value= #"\"RAW;SAM;EMP;BGD;DIV;MSK;\"" 
    7176                 
    72         Button button_0,pos={541,79},size={130,20},proc=V_isoCorrectButtonProc,title="Apply Corrections" 
    73 //      Button button_1,pos={651,79},size={80,20},proc=V_isoDetFitGuessButtonProc,title="Guess" 
    74         Button button_2,pos={821,20},size={80,20},proc=V_isoHelpButtonProc,title="Help" 
    75  
    76  
    77  
    78         CheckBox check_0,pos={542.00,131.00},size={110.00,16.00},title="non-linear correction" 
     77        Button button_0,pos={sc*541,79*sc},size={sc*130,20*sc},proc=V_isoCorrectButtonProc,title="Apply Corrections" 
     78//      Button button_1,pos={sc*651,79*sc},size={sc*80,20*sc},proc=V_isoDetFitGuessButtonProc,title="Guess" 
     79        Button button_2,pos={sc*821,20*sc},size={sc*80,20*sc},proc=V_isoHelpButtonProc,title="Help" 
     80 
     81 
     82 
     83        CheckBox check_0,pos={sc*542.00,131.00*sc},size={sc*110.00,16.00*sc},title="non-linear correction" 
    7984        CheckBox check_0,value= 0 
    80         CheckBox check_1,pos={542.00,159.00},size={110.00,16.00},title="dead time correction" 
     85        CheckBox check_1,pos={sc*542.00,159.00*sc},size={sc*110.00,16.00*sc},title="dead time correction" 
    8186        CheckBox check_1,value= 0 
    82         CheckBox check_2,pos={542.00,187.00},size={110.00,16.00},title="solid angle correction" 
     87        CheckBox check_2,pos={sc*542.00,187.00*sc},size={sc*110.00,16.00*sc},title="solid angle correction" 
    8388        CheckBox check_2,value= 0 
    84         CheckBox check_3,pos={542.00,215.00},size={110.00,16.00},title="sensitivity (DIV) correction" 
     89        CheckBox check_3,pos={sc*542.00,215.00*sc},size={sc*110.00,16.00*sc},title="sensitivity (DIV) correction" 
    8590        CheckBox check_3,value= 0 
    86         CheckBox check_4,pos={542.00,243.00},size={110.00,16.00},title="transmission correction" 
     91        CheckBox check_4,pos={sc*542.00,243.00*sc},size={sc*110.00,16.00*sc},title="transmission correction" 
    8792        CheckBox check_4,value= 0 
    88         CheckBox check_5,pos={542.00,271.00},size={110.00,16.00},title="tube shadow correction" 
     93        CheckBox check_5,pos={sc*542.00,271.00*sc},size={sc*110.00,16.00*sc},title="tube shadow correction" 
    8994        CheckBox check_5,value= 0 
    90         CheckBox check_6,pos={542.00,300.00},size={110.00,16.00},title="monitor normalization" 
     95        CheckBox check_6,pos={sc*542.00,300.00*sc},size={sc*110.00,16.00*sc},title="monitor normalization" 
    9196        CheckBox check_6,value= 0 
    9297 
     
    315320        SetDataFolder $("root:Packages:NIST:VSANS:"+folder+":entry:instrument:detector_"+str) 
    316321        Wave data1 = data 
     322 
     323 
     324        Variable sc = 1 
     325         
     326        NVAR gLaptopMode = root:Packages:NIST:VSANS:Globals:gLaptopMode 
     327                 
     328        if(gLaptopMode == 1) 
     329                sc = 0.7 
     330        endif 
     331         
     332        left *= sc 
     333        top *= sc 
     334        right *= sc 
     335        bottom *= sc 
     336         
     337        left2 *= sc 
     338        top2 *= sc 
     339        right2 *= sc 
     340        bottom2 *= sc 
     341         
    317342         
    318343        //draw the detector panel 
     
    364389                        // temporarily set the global (preference) flags 
    365390 
    366 //                      CheckBox check_0,pos={542.00,131.00},size={110.00,16.00},title="non-linear correction" 
     391//                      CheckBox check_0,pos={sc*542.00,131.00*sc},size={sc*110.00,16.00*sc},title="non-linear correction" 
    367392                        NVAR gDoNonLinearCor = root:Packages:NIST:VSANS:Globals:gDoNonLinearCor 
    368393                        sav0 = gDoNonLinearCor 
     
    370395                        gDoNonLinearCor = V_Value 
    371396                         
    372 //                      CheckBox check_1,pos={542.00,159.00},size={110.00,16.00},title="dead time correction" 
     397//                      CheckBox check_1,pos={sc*542.00,159.00*sc},size={sc*110.00,16.00*sc},title="dead time correction" 
    373398                        NVAR gDoDeadTimeCor = root:Packages:NIST:VSANS:Globals:gDoDeadTimeCor 
    374399                        sav1 = gDoDeadTimeCor 
     
    376401                        gDoDeadTimeCor = V_Value 
    377402                         
    378 //                      CheckBox check_2,pos={542.00,187.00},size={110.00,16.00},title="solid angle correction" 
     403//                      CheckBox check_2,pos={sc*542.00,187.00*sc},size={sc*110.00,16.00*sc},title="solid angle correction" 
    379404                        NVAR gDoSolidAngleCor = root:Packages:NIST:VSANS:Globals:gDoSolidAngleCor 
    380405                        sav2 = gDoSolidAngleCor 
     
    382407                        gDoSolidAngleCor = V_Value 
    383408                         
    384 //                      CheckBox check_3,pos={542.00,215.00},size={110.00,16.00},title="sensitivity (DIV) correction" 
     409//                      CheckBox check_3,pos={sc*542.00,215.00*sc},size={sc*110.00,16.00*sc},title="sensitivity (DIV) correction" 
    385410                        NVAR gDoDIVCor = root:Packages:NIST:VSANS:Globals:gDoDIVCor 
    386411                        sav3 = gDoDIVCor 
     
    388413                        gDoDIVCor = V_Value 
    389414                         
    390 //                      CheckBox check_4,pos={542.00,243.00},size={110.00,16.00},title="transmission correction" 
     415//                      CheckBox check_4,pos={sc*542.00,243.00*sc},size={sc*110.00,16.00*sc},title="transmission correction" 
    391416                        NVAR gDoTrans = root:Packages:NIST:VSANS:Globals:gDoTransmissionCor 
    392417                        sav4 = gDoTrans 
     
    394419                        gDoTrans = V_Value 
    395420                         
    396 //                      CheckBox check_5,pos={542.00,271.00},size={110.00,16.00},title="tube shadow correction" 
     421//                      CheckBox check_5,pos={sc*542.00,271.00*sc},size={sc*110.00,16.00*sc},title="tube shadow correction" 
    397422                        NVAR gDoTubeShadowCor = root:Packages:NIST:VSANS:Globals:gDoTubeShadowCor 
    398423                        sav5 = gDoTubeShadowCor 
     
    400425                        gDoTubeShadowCor = V_Value 
    401426                         
    402 //                      CheckBox check_6,pos={542.00,300.00},size={110.00,16.00},title="monitor normalization" 
     427//                      CheckBox check_6,pos={sc*542.00,300.00*sc},size={sc*110.00,16.00*sc},title="monitor normalization" 
    403428                        NVAR gDoMonitorNormalization = root:Packages:NIST:VSANS:Globals:gDoMonitorNormalization 
    404429                        sav6 = gDoMonitorNormalization 
Note: See TracChangeset for help on using the changeset viewer.