Community
Question: Is there a way to make ULC UX panels dynamically scale to the client's monitor resolution?
Currently the web client opens at a fixed size, and the user has to manually click fullscreen. Ideally, the panel should detect the client's screen resolution and open in fullscreen or auto-scale to fit.
One sidenote - for ULC UX web client - a reverse proxy is to be setup additionally? otherwise timeouts on the websocket connections occur a lot.
Responses (2)
Panel with layout management enabled automatically scale to fit the available size.
I have not seen the need to setup a reverse proxy to prevent websocket connection time-outs.
With layout management you can indeed achieve a panel that resizes to the available resolution. One issue that we've seen is that with rescaling the window the layout management gets distorted. Therefor we have this workaround that works better.
main() // basepanel
{
---
uiConnect("WindowChangedResize", "windowResized");
this.windowState("WindowMaximized");
this.windowFlags("FramelessWindowHint");
----
}
void WindowChangedResize(mapping mEvents)
{
// Remember the engineering sizes
if (bFirstCallback)
{
engSizeWidth = mEvents["oldSize"]["width"];
engSizeHeight = mEvents["oldSize"]["height"];
bFirstCallback = false;
}
// Catching the resize-callback which is we want to skip
if ((mEvents["size"]["width"] != engSizeWidth || mEvents["size"]["height"] != engSizeHeight))
return;
// New dimensions of the window, match the panel to it.
this.windowState("WindowMaximized");
this.windowFlags("FramelessWindowHint");
}