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

    r1242 r1246  
    4242//      Variable binType 
    4343 
     44 
     45        Variable sc = 1 
     46         
     47        NVAR gLaptopMode = root:Packages:NIST:VSANS:Globals:gLaptopMode 
     48                 
     49        if(gLaptopMode == 1) 
     50                sc = 0.7 
     51        endif 
     52 
    4453        DoWindow/F V_1D_Data 
    4554        if(V_flag==0) 
     
    5261//              Variable/G root:Packages:NIST:VSANS:Globals:Plot_1D:gExpC = 1 
    5362                 
    54                  
    55                 Display /W=(277,526,748,938)/N=V_1D_Data/K=1 
     63                if(gLaptopMode == 1) 
     64                        Display /W=(200,50,(200+470)*sc,(50+412)*sc)/N=V_1D_Data/K=1 
     65                else 
     66                        Display /W=(277,526,748,938)/N=V_1D_Data/K=1 
     67                endif 
     68 
    5669 
    5770                ControlBar 70 
    5871                 
    59                 PopupMenu popup0,pos={16,5},size={71,20},title="Bin Type" 
     72                PopupMenu popup0,pos={sc*16,5*sc},size={sc*71,20*sc},title="Bin Type" 
    6073                PopupMenu popup0,help={"This popup selects how the y-axis will be linearized based on the chosen data"} 
    6174                PopupMenu popup0,value= ksBinTypeStr 
    6275                PopupMenu popup0,mode=1,proc=V_BinningModePopup 
    6376                 
    64                 CheckBox check0,pos={18.00,36.00},size={57.00,16.00},proc=V_Plot1D_LogCheckProc,title="Log Axes" 
     77                CheckBox check0,pos={sc*18.00,36.00*sc},size={sc*57.00,16.00*sc},proc=V_Plot1D_LogCheckProc,title="Log Axes" 
    6578                CheckBox check0,value= 1 
    6679         
    67 //              PopupMenu ymodel,pos={150,5},size={71,20},title="y-axis" 
     80//              PopupMenu ymodel,pos={sc*150,5*sc},size={sc*71,20*sc},title="y-axis" 
    6881//              PopupMenu ymodel,help={"This popup selects how the y-axis will be linearized based on the chosen data"} 
    6982//              PopupMenu ymodel,value= #"\"I;log(I);ln(I);1/I;I^a;Iq^a;I^a q^b;1/sqrt(I);ln(Iq);ln(Iq^2)\"" 
    7083//              PopupMenu ymodel,mode=NumVarOrDefault("root:Packages:NIST:VSANS:Globals:Plot_1d:gYMode", 1 ),proc=V_YMode_PopMenuProc 
    71 //              PopupMenu xmodel,pos={220,5},size={74,20},title="x-axis" 
     84//              PopupMenu xmodel,pos={sc*220,5*sc},size={sc*74,20*sc},title="x-axis" 
    7285//              PopupMenu xmodel,help={"This popup selects how the x-axis will be linearized given the chosen data"} 
    7386//              PopupMenu xmodel,value= #"\"q;log(q);q^2;q^c\"" 
    7487//              PopupMenu xmodel,mode=NumVarOrDefault("root:Packages:NIST:VSANS:Globals:Plot_1d:gXMode", 1 ),proc=V_XMode_PopMenuProc 
    75 ////            Button Rescale,pos={281,5},size={70,20},proc=V_Rescale_Plot_1D_ButtonProc,title="Rescale" 
     88////            Button Rescale,pos={sc*281,5*sc},size={sc*70,20*sc},proc=V_Rescale_Plot_1D_ButtonProc,title="Rescale" 
    7689////            Button Rescale,help={"Rescale the x and y-axes of the data"},disable=1 
    7790// 
    78 //              SetVariable expa,pos={120,28},size={80,15},title="pow \"a\"" 
     91//              SetVariable expa,pos={sc*120,28*sc},size={sc*80,15*sc},title="pow \"a\"" 
    7992//              SetVariable expa,help={"This sets the exponent \"a\" for some y-axis formats. The value is ignored if the model does not use an adjustable exponent"} 
    8093//              SetVariable expa,limits={-2,10,0},value= root:Packages:NIST:VSANS:Globals:Plot_1d:gExpA 
    81 //              SetVariable expb,pos={120,46},size={80,15},title="pow \"b\"" 
     94//              SetVariable expb,pos={sc*120,46*sc},size={sc*80,15*sc},title="pow \"b\"" 
    8295//              SetVariable expb,help={"This sets the exponent \"b\" for some x-axis formats. The value is ignored if the model does not use an adjustable exponent"} 
    8396//              SetVariable expb,limits={0,10,0},value= root:Packages:NIST:VSANS:Globals:Plot_1d:gExpB 
    8497// 
    85 //              SetVariable expc,pos={220,28},size={80,15},title="pow \"c\"" 
     98//              SetVariable expc,pos={sc*220,28*sc},size={sc*80,15*sc},title="pow \"c\"" 
    8699//              SetVariable expc,help={"This sets the exponent \"c\" for some x-axis formats. The value is ignored if the model does not use \"c\" as an adjustable exponent"} 
    87100//              SetVariable expc,limits={-10,10,0},value= root:Packages:NIST:VSANS:Globals:Plot_1d:gExpC 
    88101                 
    89                 Button AllQ,pos={320,15},size={70,20},proc=V_AllQ_Plot_1D_ButtonProc,title="All Q" 
     102                Button AllQ,pos={sc*300,15*sc},size={sc*70,20*sc},proc=V_AllQ_Plot_1D_ButtonProc,title="All Q" 
    90103                Button AllQ,help={"Show the full q-range of the dataset"} 
    91104 
    92                 Button Offset,pos={320,38},size={70,20},proc=V_RemoveOffset_ButtonProc,title="No Offset" 
     105                Button Offset,pos={sc*300,38*sc},size={sc*70,20*sc},proc=V_RemoveOffset_ButtonProc,title="No Offset" 
    93106                Button Offset,help={"Remove the offset"} 
    94107                                 
Note: See TracChangeset for help on using the changeset viewer.