There's an easier way to resize all your graphs/windows/boxes, etc... dynamically per individual user that runs your scripts
1. Create a new window and maximize it
2. Grab the width of the window and it will return the pixels. (If the tangible width is 1920 and scaling is set to 150% then in theory, it should return 1280 pixels)
3. Have a function that sizes all of your boxes.. etc.. (I'd scale 2/3 if their width is < 1600)
4. Anytime you set the size of any graph/box/etc call set_width function
Hope this helps someone in the future
temp_window = New Window( "Width Check",
H List Box(
Text Box( "A" ),
sb1 = Spacer Box(),
Text Box( "B" ),
sb2 = Spacer Box( size( 20, 10 ), color( "red" ) ),
Text Box( "C" )
)
);
temp_window << Maximize Window( 1 );
USER_WIDTH = temp_window << Get Width();
temp_window << Close Window;
set_width = Function({w},
{},
new_w = w;
if(USER_WIDTH < 1600,
new_w = w * (2/3);
);
Return(new_w);
);