Allow window start position and size to be relative to screen size

  • Feature Description:

Rather than starting the window at a fixed pixel location on the desktop, with a fixed window size, devs should be able to specify anchors and/or percentages.

  • impact for my app: [low, mid, high, show-stopper].

Mid-impact. We can carry on without this, but the user’s first impression of the app is influenced by where the app starts, how big it is, and whether or not that’s convenient.

  • What is your current pain point?

Devs should not need to manually check the monitor’s resolution to center a window on creation, or to right-align it, or to make it 66% the width of the display.

  • What do you have in mind to solve it?

I think it would be very helpful to cover the cases of percentage-based positioning and sizing.

For example, if I want my window to be 50% of the screen, and I want it centered, I would set:

X = 25%
Y = 25%
W = 50%
H = 50%.

For example, if I want my window to be 200px wide and 100% tall, aligned to the right side of the screen (so it’s a right-aligned tool window), I would set:

X = 100% - 200px
Y = 0px
W = 200px
H = 100%

An alternative to allowing arithmetic expressions for X is to allow devs to specify Left or Right, rather than X. That way I could say Right = 100%, which automatically calculates X to be whatever Right is, minus the Width.

Also note, this would need to update appropriately when the resolution changes.

note for stuff: after FR is accepted, add a link to the internal ticket.

Hi and thanks for the feedback.

We will discuss the matter internally, and then we’ll make a decision.

Usually, it takes a few days. We will update you here.

Thanks.