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

    r1242 r1246  
    5151 
    5252Window V_TransmissionPanel() : Panel 
     53 
     54        Variable sc = 1 
     55                         
     56        if(root:Packages:NIST:VSANS:Globals:gLaptopMode == 1) 
     57                sc = 0.7 
     58        endif 
     59         
    5360        PauseUpdate; Silent 1           // building window... 
    54         NewPanel /W=(1496,366,1974,990) /K=1 
     61        NewPanel /W=(1496*sc,366*sc,1950*sc,940*sc) /K=1 
    5562        ModifyPanel cbRGB=(32896,16448,0,19621) 
    5663        DoWindow/C V_TransmissionPanel 
    5764 
    5865//      ShowTools/A 
    59         PopupMenu popup_0,pos={16.00,359.00},size={104.00,23.00},fstyle=1,fsize=12,proc=V_TSamFilePopMenuProc,title="Sample" 
     66        PopupMenu popup_0,pos={sc*16.00,359.00*sc},size={sc*104.00,23.00*sc},fstyle=1,fsize=12*sc,proc=V_TSamFilePopMenuProc,title="Sample" 
    6067        PopupMenu popup_0,mode=1,popvalue="_none_",value= #"root:Packages:NIST:VSANS:Globals:Transmission:gSamMatchList" 
    61         PopupMenu popup_1,pos={12.00,229.00},size={195.00,23.00},fstyle=1,fsize=12,proc=V_TTransmFilePopMenuProc,title="Transmission" 
     68        PopupMenu popup_1,pos={sc*12.00,229.00*sc},size={sc*195.00,23.00*sc},fstyle=1,fsize=12*sc,proc=V_TTransmFilePopMenuProc,title="Transmission" 
    6269        PopupMenu popup_1,mode=1,popvalue="_none_",value = #"root:Packages:NIST:VSANS:Globals:Transmission:gTransMatchList"//value= V_getFilePurposeList("TRANSMISSION",0) 
    63         PopupMenu popup_2,pos={17.00,79.00},size={188.00,23.00},fstyle=1,fsize=12,proc=V_TEmpBeamPopMenuProc,title="Open Beam" 
     70        PopupMenu popup_2,pos={sc*17.00,79.00*sc},size={sc*188.00,23.00*sc},fstyle=1,fsize=12*sc,proc=V_TEmpBeamPopMenuProc,title="Open Beam" 
    6471        PopupMenu popup_2,mode=1,popvalue="sans1.nxs.ngv",value= V_getFileIntentList("OPEN BEAM",0) 
    65         Button button_0,pos={34.00,499.00},size={100.00,20.00},proc=V_CalcTransmButtonProc,title="Calculate" 
    66         Button button_2,pos={349.00,13.00},size={30.00,20.00},proc=V_HelpTransmButtonProc,title="?" 
    67         Button button_3,pos={410.00,13.00},size={50.00,20.00},proc=V_DoneTransmButtonProc,title="Done" 
    68         Button button_4,pos={164.00,500.00},size={150.00,20.00},proc=V_CalcTransmListButtonProc,title="Calculate All In Popup" 
    69         SetVariable setvar_0,pos={18.00,390.00},size={300.00,14.00},title="Label:" 
     72        Button button_0,pos={sc*34.00,499.00*sc},size={sc*100.00,20.00*sc},proc=V_CalcTransmButtonProc,title="Calculate" 
     73        Button button_2,pos={sc*340.00,13.00*sc},size={sc*30.00,20.00*sc},proc=V_HelpTransmButtonProc,title="?" 
     74        Button button_3,pos={sc*380.00,13.00*sc},size={sc*50.00,20.00*sc},proc=V_DoneTransmButtonProc,title="Done" 
     75        Button button_4,pos={sc*164.00,500.00*sc},size={sc*150.00,20.00*sc},proc=V_CalcTransmListButtonProc,title="Calculate All In Popup" 
     76        SetVariable setvar_0,pos={sc*18.00,390.00*sc},size={sc*300.00,14.00*sc},title="Label:" 
    7077        SetVariable setvar_0,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gSamLabel 
    71         SetVariable setvar_1,pos={18.00,417.00},size={300.00,14.00},title="Group ID:" 
     78        SetVariable setvar_1,pos={sc*18.00,417.00*sc},size={sc*300.00,14.00*sc},title="Group ID:" 
    7279        SetVariable setvar_1,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gSamGrpID 
    73         SetVariable setvar_2,pos={15.00,257.00},size={300.00,14.00},title="Label:" 
     80        SetVariable setvar_2,pos={sc*15.00,257.00*sc},size={sc*300.00,14.00*sc},title="Label:" 
    7481        SetVariable setvar_2,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gTransLabel 
    75         SetVariable setvar_3,pos={14.00,283.00},size={300.00,14.00},title="Group ID:" 
     82        SetVariable setvar_3,pos={sc*14.00,283.00*sc},size={sc*300.00,14.00*sc},title="Group ID:" 
    7683        SetVariable setvar_3,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gTrnGrpID 
    77         SetVariable setvar_4,pos={18.00,108.00},size={300.00,14.00},title="Label:" 
     84        SetVariable setvar_4,pos={sc*18.00,108.00*sc},size={sc*300.00,14.00*sc},title="Label:" 
    7885        SetVariable setvar_4,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gEmptyLabel 
    79         SetVariable setvar_5,pos={18.00,132.00},size={300.00,14.00},title="XY Box:" 
     86        SetVariable setvar_5,pos={sc*18.00,132.00*sc},size={sc*300.00,14.00*sc},title="XY Box:" 
    8087        SetVariable setvar_5,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gEmptyBoxCoord 
    81         SetVariable setvar_6,pos={18.00,157.00},size={300.00,14.00},fstyle=1,fsize=12,title="Panel:" 
     88        SetVariable setvar_6,pos={sc*18.00,157.00*sc},size={sc*300.00,14.00*sc},title="Panel:"          //,fstyle=1,fsize=12*sc 
    8289        SetVariable setvar_6,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gEmptyPanel 
    83         SetVariable setvar_7,pos={18.00,442.00},size={300.00,14.00},title="Transmission:" 
     90        SetVariable setvar_7,pos={sc*18.00,442.00*sc},size={sc*300.00,14.00*sc},title="Transmission:" 
    8491        SetVariable setvar_7,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gTrans 
    85         SetVariable setvar_8,pos={18.00,467.00},size={300.00,14.00},title="Error:" 
     92        SetVariable setvar_8,pos={sc*18.00,467.00*sc},size={sc*300.00,14.00*sc},title="Error:" 
    8693        SetVariable setvar_8,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gTransErr 
    8794EndMacro 
    8895 
    8996 
    90 //Window V_TransmissionPanel() : Panel 
    91 //      PauseUpdate; Silent 1           // building window... 
    92 //      NewPanel /W=(1286,328,1764,952) 
    93 //      ModifyPanel cbRGB=(32896,16448,0,19621) 
    94 //      DoWindow/C V_TransmissionPanel 
    95 // 
    96 ////    ShowTools/A 
    97 //      PopupMenu popup_0,pos={19.00,55.00},size={86.00,23.00},proc=V_TSamFilePopMenuProc,title="Sample" 
    98 ////    PopupMenu popup_0,mode=1,value= V_getFilePurposeList("SCATTERING",0)//+V_getFileIntentList("EMPTY CELL",0) 
    99 //      PopupMenu popup_0,mode=1,value=root:Packages:NIST:VSANS:Globals:Transmission:gSamMatchList  
    100 //      PopupMenu popup_1,pos={102,248},size={72.00,23.00},proc=V_TTransmFilePopMenuProc,title="Transmission" 
    101 //      PopupMenu popup_1,mode=1,value= V_getFilePurposeList("TRANSMISSION",0) 
    102 //      PopupMenu popup_2,pos={164,353},size={72.00,23.00},proc=V_TEmpBeamPopMenuProc,title="Open Beam" 
    103 ////    PopupMenu popup_2,mode=1,value= V_getFileIntentList("EMPTY BEAM",0) 
    104 //      PopupMenu popup_2,mode=1,value= V_getFileIntentList("OPEN BEAM",0) 
    105 //      Button button_0,pos={37,193},size={100.00,20.00},proc=V_CalcTransmButtonProc,title="Calculate" 
    106 ////    Button button_1,pos={23.00,491.00},size={100.00,20.00},proc=V_WriteTransmButtonProc,title="Write" 
    107 //      Button button_2,pos={349.00,13.00},size={30.00,20.00},proc=V_HelpTransmButtonProc,title="?" 
    108 //      Button button_3,pos={410.00,13.00},size={50.00,20.00},proc=V_DoneTransmButtonProc,title="Done" 
    109 //      SetVariable setvar_0,pos={21.00,86.00},size={300.00,14.00},title="Label:" 
    110 //      SetVariable setvar_0,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gSamLabel 
    111 //      SetVariable setvar_1,pos={21.00,113.00},size={300.00,14.00},title="Group ID:" 
    112 //      SetVariable setvar_1,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gSamGrpID 
    113 //      SetVariable setvar_2,pos={105,276.00},size={300.00,14.00},title="Label:" 
    114 //      SetVariable setvar_2,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gTransLabel 
    115 //      SetVariable setvar_3,pos={104,302},size={300.00,14.00},title="Group ID:" 
    116 //      SetVariable setvar_3,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gTrnGrpID 
    117 //      SetVariable setvar_4,pos={165,382},size={300.00,14.00},title="Label:" 
    118 //      SetVariable setvar_4,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gEmptyLabel 
    119 //      SetVariable setvar_5,pos={165,406},size={300.00,14.00},title="XY Box:" 
    120 //      SetVariable setvar_5,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gEmptyBoxCoord 
    121 //      SetVariable setvar_6,pos={165,431},size={300.00,14.00},title="Panel:" 
    122 //      SetVariable setvar_6,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gEmptyPanel 
    123 //      SetVariable setvar_7,pos={21,138},size={300.00,14.00},title="Transmission:" 
    124 //      SetVariable setvar_7,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gTrans 
    125 //      SetVariable setvar_8,pos={21,163},size={300.00,14.00},title="Error:" 
    126 //      SetVariable setvar_8,limits={-inf,inf,0},value= root:Packages:NIST:VSANS:Globals:Transmission:gTransErr 
    127 //EndMacro 
     97 
    12898 
    12999// TODO 
Note: See TracChangeset for help on using the changeset viewer.