Mar 19, 2020 4:35:21 PM (2 years ago)

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.

1 edited


  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_MultipleReduce.ipf

    r1242 r1246  
    6363Window V_Multiple_Reduce_Panel() 
     65        Variable sc = 1 
     67        if(root:Packages:NIST:VSANS:Globals:gLaptopMode == 1) 
     68                sc = 0.7 
     69        endif 
    6471        PauseUpdate; Silent 1           // building window... 
    65         NewPanel /W=(535,72,951,228) /K=1 as "Multiple VSANS File Reduction" 
     72        NewPanel /W=(535*sc,72*sc,951*sc,228*sc) /K=1 as "Multiple VSANS File Reduction" 
    6673        ModifyPanel cbRGB=(64535,49151,48490) 
    6774        ModifyPanel fixedSize=1 
    6875        SetDrawLayer UserBack 
    69         DrawLine 7,30,422,30 
    70         SetVariable PathDisplay,pos={77,7},size={300,13},title="Path" 
     76        DrawLine 7*sc,30*sc,422*sc,30*sc 
     77        SetVariable PathDisplay,pos={sc*77,7*sc},size={sc*300,13*sc},title="Path" 
    7178        SetVariable PathDisplay,help={"This is the path to the folder that will be used to find the SANS data while reducing. If no files appear in the popup, make sure that this folder is set correctly"} 
    7279        SetVariable PathDisplay,limits={-Inf,Inf,0},value= root:Packages:NIST:VSANS:Globals:MRED:gCatPathStr 
    73         Button PathButton,pos={3,3},size={70,20},proc=V_PickMRPathButton,title="Pick Path" 
     80        Button PathButton,pos={sc*3,3*sc},size={sc*70,20*sc},proc=V_PickMRPathButton,title="Pick Path" 
    7481        Button PathButton,help={"Select the folder containing the raw SANS data files"} 
    75         Button helpButton,pos={385,3},size={25,20},proc=V_ShowMRHelp,title="?" 
     82        Button helpButton,pos={sc*385,3*sc},size={sc*25,20*sc},proc=V_ShowMRHelp,title="?" 
    7683        Button helpButton,help={"Show the help file for reducing multiple files using the same protocol"} 
    77         PopupMenu MRFilesPopup,pos={3,72},size={167,19},proc=V_MRedPopMenuProc,title="File(s) to Reduce" 
     84        PopupMenu MRFilesPopup,pos={sc*3,72*sc},size={sc*167,19*sc},proc=V_MRedPopMenuProc,title="File(s) to Reduce" 
    7885        PopupMenu MRFilesPopup,help={"The displayed file is the one that will be reduced. The entire list will be reduced if \"Reduce All..\" is selected. \r If no items, or the wrong items appear, click on the popup to refresh."} 
    7986        PopupMenu MRFilesPopup,mode=1,popvalue="none",value= #"root:Packages:NIST:VSANS:Globals:MRED:gMRedList" 
    80         SetVariable MRList,pos={3,48},size={350,13},proc=V_FileNumberListProc,title="File number list: " 
     87        SetVariable MRList,pos={sc*3,48*sc},size={sc*350,13*sc},proc=V_FileNumberListProc,title="File number list: " 
    8188        SetVariable MRList,help={"Enter a comma delimited list of file numbers to reduce. Ranges can be entered using a dash."} 
    8289        SetVariable MRList,limits={-Inf,Inf,1},value= root:Packages:NIST:VSANS:Globals:MRED:gFileNumList 
    83         Button ReduceAllButton,pos={3,128},size={180,20},proc=V_ReduceAllPopupFiles,title="Reduce All Files in Popup" 
     90        Button ReduceAllButton,pos={sc*3,128*sc},size={sc*180,20*sc},proc=V_ReduceAllPopupFiles,title="Reduce All Files in Popup" 
    8491        Button ReduceAllButton,help={"This will reduce ALL of the files in the popup list, not just the top file."} 
    85 //      Button ReduceOneButton,pos={3,98},size={180,20},proc=V_ReduceTopPopupFile,title="Reduce Top File in Popup" 
     92//      Button ReduceOneButton,pos={sc*3,98*sc},size={sc*180,20*sc},proc=V_ReduceTopPopupFile,title="Reduce Top File in Popup" 
    8693//      Button ReduceOneButton,help={"This will reduce TOP files in the popup list, not all of the files."} 
    87         Button DoneButton,pos={290,128},size={110,20},proc=V_MRDoneButtonProc,title="Done Reducing" 
     94        Button DoneButton,pos={sc*290,128*sc},size={sc*110,20*sc},proc=V_MRDoneButtonProc,title="Done Reducing" 
    8895        Button DoneButton,help={"When done reducing files, this will close this control panel."} 
    89         Button cat_short,pos={310,72},size={90,20},proc=V_ShowCatShort_MRED,title="File Catalog" 
     96        Button cat_short,pos={sc*310,72*sc},size={sc*90,20*sc},proc=V_ShowCatShort_MRED,title="File Catalog" 
    9097        Button cat_short,help={"Use this button to generate a table with file header information. Very useful for identifying files."} 
    91 //      Button show_cat_short,pos={280,98},size={120,20},proc=ShowCatShort_MRED,title="Show File Catalog" 
     98//      Button show_cat_short,pos={sc*280,98*sc},size={sc*120,20*sc},proc=ShowCatShort_MRED,title="Show File Catalog" 
    9299//      Button show_cat_short,help={"Use this button to bring the File Catalog window to the front."} 
    93 //      Button sddList,pos={280,72},size={120,20},proc=ScatteringAtSDDTableButton,title="Files at SDD List" 
     100//      Button sddList,pos={sc*280,72*sc},size={sc*120,20*sc},proc=ScatteringAtSDDTableButton,title="Files at SDD List" 
    94101//      Button sddList,help={"Use this button to generate a table of scattering files at a given ample to detector distance."} 
    95 //      Button acceptList,pos={280,98},size={120,20},proc=AcceptMREDList,title="Accept List" 
     102//      Button acceptList,pos={sc*280,98*sc},size={sc*120,20*sc},proc=AcceptMREDList,title="Accept List" 
    96103//      Button acceptList,help={"Accept the list of files to reduce."} 
    97         PopupMenu MRProto_pop,pos={3,98},size={119,19},proc=V_MRProtoPopMenuProc,title="Protocol " 
     104        PopupMenu MRProto_pop,pos={sc*3,98*sc},size={sc*119,19*sc},proc=V_MRProtoPopMenuProc,title="Protocol " 
    98105        PopupMenu MRProto_pop,help={"All of the data files in the popup will be reduced using this protocol"} 
    99106        PopupMenu MRProto_pop,mode=1,popvalue="none",value= #"root:Packages:NIST:VSANS:Globals:MRED:gMRProtoList" 
Note: See TracChangeset for help on using the changeset viewer.