Suggestion: support different window/docking layouts. depending on screen size/orientation

This is purely a would-like-to-have feature to satisfy my own compulsion, certainly not something to worry too much about. But it would be nice! :grinning_face:

I work on a computer with multiple displays: in general, when I am at my desk, my displays are side-by-side in a vertical/portrait orientation but, when I am on the road, I am limited to my laptop display, which is the more traditional horizontal/landscape orientation (and much smaller).

Since the displays I use most-regularly are the two vertical displays, I have arranged my RoyalTS window so that, by default, the main document area takes up most of the top of the window, and the ancillary Navigation/Prpperties are positioned below this.

However, when I am forced to switch (e.g. if I want to move the window to my laptop screen, or if I have to remote into my main machine from a horizontally-configured device) I have to rearrange this layout for the relatively short period I am in that state, then rearrange them all back again when I go back to my regular setup.

    +------------+           +------------------------------+
    |  toolbar   |           | toolbar                      |
    +------------+           +----+-------------------------+
    |            |           | n  |                         |
    |    main    |           | a  |          main           |
    |  document  |           | v  |        document         |
    |    area    |           |____|          area           |
    |            |           |uuu |                         |
    +----+-------+           +----+-------------------------+
    | n  | props |                     (horizontal)
    | a  |_______|
    | v  |uuu    |
    +----+-------+
      (vertical)

In a perfect world, I would like RoyalTS to…

  • either save more than one docking layout and allow me to quickly switch between them with a button/dropdown I can place in the Quick Access Toolbar;
  • or automatically switch between them depending on the resolution and/or aspect ratio of the display on which the main window is currently displayed, e.g. possibly in reaction to WM_WINDOWPOSCHANGED, WM_DISPLAYCHANGED and/or WM_DPICHANGED.

I believe you can use the MonitorFromWindow Win32 call to get the most-appropriate monitor, then GetMonitorInfo to get the resolution, from which you can compare width > height or height > width to determine the orientation. There may also be higher-level approaches.

I don’t know what docking solution you use, but I assume it can serialize its layout to a persistable format, and that you can apply them programmatically. I expect that is what you are doing on startup, anyway.


PS. as an aside, I note that when Royal TS starts, it never quite restores the vertical layout properly – the lower portion where I keep my ancillary panels is always slightly smaller on restart.

Certainly not a big deal, but it creates a bit of “workflow friction” when I have to begrudgingly restart the computer for updates: the Reconnect dialog you get on startup is modal, so I can’t get the window size right before the sessions reconnect; resizing when there are open connections can lead to scaling issues in the remote desktop!