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

    r1242 r1246  
    373373// 
    374374Window Main_VSANS_Panel() 
     375        Variable sc=1 
     376         
     377        if(root:Packages:NIST:VSANS:Globals:gLaptopMode == 1) 
     378                sc = 0.7 
     379        endif 
     380 
    375381        PauseUpdate; Silent 1           // building window... 
    376         NewPanel /W=(500,60,924,320) /K=2 as "VSANS Reduction Controls" + " " + num2str(kVSANSVersion) 
     382        NewPanel /W=(500*sc,60*sc,924*sc,320*sc) /K=1 as "VSANS Reduction Controls" + " " + num2str(kVSANSVersion) 
    377383        ModifyPanel cbRGB=(49694,61514,27679) 
    378384        ModifyPanel fixedSize=1 
    379385////// 
    380386//on main portion of panel 
    381         Button MainButtonA,pos={8,8},size={80,20},title="Pick Path",proc=V_PickPath_MainButtonProc 
     387        Button MainButtonA,pos={sc*8,8*sc},size={sc*80,20*sc},title="Pick Path",proc=V_PickPath_MainButtonProc 
    382388        Button MainButtonA,help={"Pick the local data folder that contains the VSANS data"} 
    383         Button MainButtonB,pos={100,8},size={90,20},proc=V_CatVShort_MainButtonProc,title="File Catalog" 
     389        Button MainButtonB,pos={sc*100,8*sc},size={sc*90,20*sc},proc=V_CatVShort_MainButtonProc,title="File Catalog" 
    384390        Button MainButtonB,help={"This will generate a condensed CATalog table of all files in a specified local folder"} 
    385         Button MainButtonC,pos={250,8},size={50,20},proc=V_HelpMainButtonProc,title="Help" 
     391        Button MainButtonC,pos={sc*250,8*sc},size={sc*50,20*sc},proc=V_HelpMainButtonProc,title="Help" 
    386392        Button MainButtonC,help={"Display the help file"} 
    387         Button MainButtonD,pos={320,8},size={80,20},proc=V_SR_OpenTracTicketPage,title="Feedback" 
     393        Button MainButtonD,pos={sc*320,8*sc},size={sc*80,20*sc},proc=V_SR_OpenTracTicketPage,title="Feedback" 
    388394        Button MainButtonD,help={"Submit bug reports or feature requests"} 
    389395         
    390         TabControl MainTab,pos={7,49},size={410,202},tabLabel(0)="Raw Data",proc=V_MainTabProc 
     396        TabControl MainTab,pos={sc*7,49*sc},size={sc*410,202*sc},tabLabel(0)="Raw Data",proc=V_MainTabProc 
    391397        TabControl MainTab,tabLabel(1)="Reduction",tabLabel(2)="1-D Ops",tabLabel(3)="2-D Ops",tabLabel(4)="Misc Ops" 
    392398        TabControl MainTab,value=0 
     
    395401         
    396402//on tab(0) - Raw Data - initially visible 
    397         Button MainButton_0a,pos={15,90},size={130,20},proc=V_DisplayMainButtonProc,title="Display Raw Data" 
     403        Button MainButton_0a,pos={sc*15,90*sc},size={sc*130,20*sc},proc=V_DisplayMainButtonProc,title="Display Raw Data" 
    398404        Button MainButton_0a,help={"Display will load and plot a single 2-D raw data file"} 
    399         Button MainButton_0b,pos={15,120},size={70,20},proc=V_PatchMainButtonProc,title="Patch" 
     405        Button MainButton_0b,pos={sc*15,120*sc},size={sc*70,20*sc},proc=V_PatchMainButtonProc,title="Patch" 
    400406        Button MainButton_0b,help={"Patch will update incorrect information in raw data headers"} 
    401         Button MainButton_0c,pos={15,150},size={110,20},proc=V_TransMainButtonProc,title="Transmission" 
     407        Button MainButton_0c,pos={sc*15,150*sc},size={sc*110,20*sc},proc=V_TransMainButtonProc,title="Transmission" 
    402408        Button MainButton_0c,help={"Shows the panel which allows calculation of sample transmissions and patching values into raw data headers"} 
    403         Button MainButton_0d,pos={15,180},size={130,20},proc=V_RealTime_MainButtonProc,title="RealTime Display" 
     409        Button MainButton_0d,pos={sc*15,180*sc},size={sc*130,20*sc},proc=V_RealTime_MainButtonProc,title="RealTime Display" 
    404410        Button MainButton_0d,help={"Shows the panel for control of the RealTime data display. Only used during data collection"} 
    405         Button MainButton_0e,pos={15,210},size={130,20},proc=V_CatSort_MainButtonProc,title="Sort Catalog" 
     411        Button MainButton_0e,pos={sc*15,210*sc},size={sc*130,20*sc},proc=V_CatSort_MainButtonProc,title="Sort Catalog" 
    406412        Button MainButton_0e,help={"Sort the Data Catalog, courtesy of ANSTO"} 
    407         Button MainButton_0f,pos={300,90},size={90,20},proc=V_DataTree_MainButtonProc,title="Data Tree" 
     413        Button MainButton_0f,pos={sc*300,90*sc},size={sc*90,20*sc},proc=V_DataTree_MainButtonProc,title="Data Tree" 
    408414        Button MainButton_0f,help={"Show the header and data tree"} 
    409         Button MainButton_0g,pos={170,180},size={110,20},proc=V_RTReduce_MainButtonProc,title="RT Reduction" 
     415        Button MainButton_0g,pos={sc*170,180*sc},size={sc*110,20*sc},proc=V_RTReduce_MainButtonProc,title="RT Reduction" 
    410416        Button MainButton_0g,help={"Reduce live (incomplete) data files during acquisition"} 
    411         Button MainButton_0h,pos={170,90},size={90,20},proc=V_Patch_XY_MainButtonProc,title="Patch XY" 
     417        Button MainButton_0h,pos={sc*170,90*sc},size={sc*90,20*sc},proc=V_Patch_XY_MainButtonProc,title="Patch XY" 
    412418        Button MainButton_0h,help={"Easy patching of XY beam center to multiple files"} 
    413         Button MainButton_0i,pos={170,120},size={110,20},proc=V_Patch_DeadTime_MainButtonProc,title="Patch DeadTime" 
     419        Button MainButton_0i,pos={sc*170,120*sc},size={sc*110,20*sc},proc=V_Patch_DeadTime_MainButtonProc,title="Patch DeadTime" 
    414420        Button MainButton_0i,help={"Easy patching of dead time tables to multiple files"} 
    415         Button MainButton_0j,pos={170,150},size={90,20},proc=V_Patch_Calib_MainButtonProc,title="Patch Calib" 
     421        Button MainButton_0j,pos={sc*170,150*sc},size={sc*90,20*sc},proc=V_Patch_Calib_MainButtonProc,title="Patch Calib" 
    416422        Button MainButton_0j,help={"Easy patching of nonlinear calibration tables to multiple files"} 
    417423 
    418424//on tab(1) - Reduction 
    419         Button MainButton_1a,pos={15,90},size={110,20},proc=V_BuildProtocol_MainButtonProc,title="Build Protocol" 
     425        Button MainButton_1a,pos={sc*15,90*sc},size={sc*110,20*sc},proc=V_BuildProtocol_MainButtonProc,title="Build Protocol" 
    420426        Button MainButton_1a,help={"Shows a panel where the CATalog window is used as input for creating a protocol. Can also be used for standard reductions"} 
    421 //      Button MainButton_1b,pos={15,120},size={110,20},proc=V_ReduceAFile_MainButtonProc,title="Reduce a File" 
     427//      Button MainButton_1b,pos={sc*15,120*sc},size={sc*110,20*sc},proc=V_ReduceAFile_MainButtonProc,title="Reduce a File" 
    422428//      Button MainButton_1b,help={"Presents a questionnare for creating a reduction protocol, then reduces a single file"} 
    423         Button MainButton_1c,pos={15,150},size={160,20},proc=V_ReduceMultiple_MainButtonProc,title="Reduce Multiple Files" 
     429        Button MainButton_1c,pos={sc*15,150*sc},size={sc*160,20*sc},proc=V_ReduceMultiple_MainButtonProc,title="Reduce Multiple Files" 
    424430        Button MainButton_1c,help={"Use for reducing multiple raw datasets after protocol(s) have been created"} 
    425 //      Button MainButton_1d,pos={15,180},size={110,20},proc=V_ShowCatShort_MainButtonProc,title="Show CAT Table" 
     431//      Button MainButton_1d,pos={sc*15,180*sc},size={sc*110,20*sc},proc=V_ShowCatShort_MainButtonProc,title="Show CAT Table" 
    426432//      Button MainButton_1d,help={"This button will bring the CATalog window to the front, if it exists"} 
    427433        Button MainButton_1a,disable=1 
     
    431437 
    432438//on tab(2) - 1-D operations 
    433         Button MainButton_2a,pos={15,90},size={60,20},proc=V_Plot1D_MainButtonProc,title="Plot" 
     439        Button MainButton_2a,pos={sc*15,90*sc},size={sc*60,20*sc},proc=V_Plot1D_MainButtonProc,title="Plot" 
    434440        Button MainButton_2a,help={"Loads and plots a 1-D dataset in the format expected by \"FIT\""} 
    435 //      Button MainButton_2b,pos={15,120},size={60,20},proc=V_Sort1D_MainButtonProc,title="Sort" 
     441//      Button MainButton_2b,pos={sc*15,120*sc},size={sc*60,20*sc},proc=V_Sort1D_MainButtonProc,title="Sort" 
    436442//      Button MainButton_2b,help={"Sorts and combines 2 or 3 separate 1-D datasets into a single file. Use \"Plot\" button to import 1-D data files"} 
    437         Button MainButton_2c,pos={15,150},size={60,20},proc=V_Fit1D_MainButtonProc,title="FIT" 
     443        Button MainButton_2c,pos={sc*15,150*sc},size={sc*60,20*sc},proc=V_Fit1D_MainButtonProc,title="FIT" 
    438444        Button MainButton_2c,help={"Shows panel for performing a variety of linearized fits to 1-D data files. Use \"Plot\" button to import 1-D data files"} 
    439 //      Button MainButton_2d,pos={15,180},size={60,20},proc=V_FITRPA_MainButtonProc,title="FIT/RPA" 
     445//      Button MainButton_2d,pos={sc*15,180*sc},size={sc*60,20*sc},proc=V_FITRPA_MainButtonProc,title="FIT/RPA" 
    440446//      Button MainButton_2d,help={"Shows panel for performing a fit to a polymer standard."} 
    441 //      Button MainButton_2e,pos={120,90},size={90,20},proc=V_Subtract1D_MainButtonProc,title="Subtract 1D" 
     447//      Button MainButton_2e,pos={sc*120,90*sc},size={sc*90,20*sc},proc=V_Subtract1D_MainButtonProc,title="Subtract 1D" 
    442448//      Button MainButton_2e,help={"Shows panel for subtracting two 1-D data sets"} 
    443         Button MainButton_2e,pos={120,90},size={110,20},proc=V_Arithmetic1D_MainButtonProc,title="1D Arithmetic" 
     449        Button MainButton_2e,pos={sc*120,90*sc},size={sc*110,20*sc},proc=V_Arithmetic1D_MainButtonProc,title="1D Arithmetic" 
    444450        Button MainButton_2e,help={"Shows panel for doing arithmetic on 1D data sets"} 
    445         Button MainButton_2f,pos={120,120},size={130,20},proc=V_Combine1D_MainButtonProc,title="Combine 1D Files" 
     451        Button MainButton_2f,pos={sc*120,120*sc},size={sc*130,20*sc},proc=V_Combine1D_MainButtonProc,title="Combine 1D Files" 
    446452        Button MainButton_2f,help={"Shows panel for selecting points to trim before combining files"} 
    447453        Button MainButton_2a,disable=1 
     
    455461 
    456462//on tab(3) - 2-D Operations 
    457         Button MainButton_3a,pos={15,90},size={90,20},proc=V_DisplayInterm_MainButtonProc,title="Display 2D" 
     463        Button MainButton_3a,pos={sc*15,90*sc},size={sc*90,20*sc},proc=V_DisplayInterm_MainButtonProc,title="Display 2D" 
    458464        Button MainButton_3a,help={"Display will plot a 2-D work data file that has previously been created during data reduction"} 
    459         Button MainButton_3b,pos={15,120},size={90,20},title="Draw Mask",proc=V_DrawMask_MainButtonProc 
     465        Button MainButton_3b,pos={sc*15,120*sc},size={sc*90,20*sc},title="Draw Mask",proc=V_DrawMask_MainButtonProc 
    460466        Button MainButton_3b,help={"Draw a mask file and save it."} 
    461         Button MainButton_3c,pos={15,150},size={90,20},proc=V_ReadMask_MainButtonProc,title="Read Mask" 
     467        Button MainButton_3c,pos={sc*15,150*sc},size={sc*90,20*sc},proc=V_ReadMask_MainButtonProc,title="Read Mask" 
    462468        Button MainButton_3c,help={"Reads a mask file into the proper work folder"} 
    463 //      Button MainButton_3d,pos={15,180},size={100,20},title="Tile RAW 2D",proc=V_ShowTilePanel_MainButtonProc 
     469//      Button MainButton_3d,pos={sc*15,180*sc},size={sc*100,20*sc},title="Tile RAW 2D",proc=V_ShowTilePanel_MainButtonProc 
    464470//      Button MainButton_3d,help={"Adds selected RAW data files to a layout."} 
    465         Button MainButton_3e,pos={150,90},size={100,20},title="Copy Work",proc=V_CopyWork_MainButtonProc 
     471        Button MainButton_3e,pos={sc*150,90*sc},size={sc*100,20*sc},title="Copy Work",proc=V_CopyWork_MainButtonProc 
    466472        Button MainButton_3e,help={"Copies WORK data from specified folder to destination folder."} 
    467 //      Button MainButton_3f,pos={150,120},size={110,20},title="WorkFile Math",proc=V_WorkMath_MainButtonProc 
     473//      Button MainButton_3f,pos={sc*150,120*sc},size={sc*110,20*sc},title="WorkFile Math",proc=V_WorkMath_MainButtonProc 
    468474//      Button MainButton_3f,help={"Perfom simple math operations on workfile data"} 
    469         Button MainButton_3g,pos={150,150},size={100,20},title="Event Data",proc=V_Event_MainButtonProc 
     475        Button MainButton_3g,pos={sc*150,150*sc},size={sc*100,20*sc},title="Event Data",proc=V_Event_MainButtonProc 
    470476        Button MainButton_3g,help={"Manipulate VSANS Event Mode data"} 
    471         Button MainButton_3h,pos={150,180},size={140,20},title="Event Reduction",proc=V_Event_MultReduceButtonProc 
     477        Button MainButton_3h,pos={sc*150,180*sc},size={sc*140,20*sc},title="Event Reduction",proc=V_Event_MultReduceButtonProc 
    472478        Button MainButton_3h,help={"Reduce VSANS Event Mode data"} 
    473479                 
     
    483489 
    484490//on tab(4) - Miscellaneous operations 
    485         Button MainButton_4a,pos={15,90},size={80,20},proc=V_Draw3D_MainButtonProc,title="3D Display" 
     491        Button MainButton_4a,pos={sc*15,90*sc},size={sc*80,20*sc},proc=V_Draw3D_MainButtonProc,title="3D Display" 
    486492        Button MainButton_4a,help={"Plots a 3-D surface of the selected file type"} 
    487 //      Button MainButton_4b,pos={15,120},size={120,20},proc=V_ShowSchematic_MainButtonProc,title="Show Schematic" 
     493//      Button MainButton_4b,pos={sc*15,120*sc},size={sc*120,20*sc},proc=V_ShowSchematic_MainButtonProc,title="Show Schematic" 
    488494//      Button MainButton_4b,help={"Use this to show a schematic of the data reduction process for a selected sample file and reduction protocol"} 
    489 //      Button MainButton_4c,pos={15,150},size={80,20},proc=V_ShowAvePanel_MainButtonProc,title="Average" 
     495//      Button MainButton_4c,pos={sc*15,150*sc},size={sc*80,20*sc},proc=V_ShowAvePanel_MainButtonProc,title="Average" 
    490496//      Button MainButton_4c,help={"Shows a panel for interactive selection of the 1-D averaging step"} 
    491 //      Button MainButton_4d,pos={15,180},size={110,20},proc=V_CatShort_MainButtonProc,title="CAT/Notebook" 
     497//      Button MainButton_4d,pos={sc*15,180*sc},size={sc*110,20*sc},proc=V_CatShort_MainButtonProc,title="CAT/Notebook" 
    492498//      Button MainButton_4d,help={"This will generate a CATalog notebook of all files in a specified local folder"} 
    493         Button MainButton_4e,pos={180,90},size={130,20},proc=V_NonLinTubes_MainButtonProc,title="Fit NonLinear Tubes" 
     499        Button MainButton_4e,pos={sc*180,90*sc},size={sc*130,20*sc},proc=V_NonLinTubes_MainButtonProc,title="Fit NonLinear Tubes" 
    494500        Button MainButton_4e,help={""} 
    495         Button MainButton_4f,pos={180,120},size={130,20},proc=V_PRODIV_MainButtonProc,title="Make DIV file" 
     501        Button MainButton_4f,pos={sc*180,120*sc},size={sc*130,20*sc},proc=V_PRODIV_MainButtonProc,title="Make DIV file" 
    496502        Button MainButton_4f,help={"Displays panels and outlines the steps for generating a detector sensitivity file"} 
    497 //      Button MainButton_4g,pos={180,150},size={130,20},proc=V_Raw2ASCII_MainButtonProc,title="RAW ASCII Export" 
     503//      Button MainButton_4g,pos={sc*180,150*sc},size={sc*130,20*sc},proc=V_Raw2ASCII_MainButtonProc,title="RAW ASCII Export" 
    498504//      Button MainButton_4g,help={"Exports selected RAW (2D) data file(s) as ASCII, either as pixel values or I(Qx,Qy)"} 
    499         Button MainButton_4h,pos={180,180},size={130,20},proc=V_Preferences_MainButtonProc,title="Preferences" 
     505        Button MainButton_4h,pos={sc*180,180*sc},size={sc*130,20*sc},proc=V_Preferences_MainButtonProc,title="Preferences" 
    500506        Button MainButton_4h,help={"Sets user preferences for selected parameters"} 
    501507         
Note: See TracChangeset for help on using the changeset viewer.