thyme icon indicating copy to clipboard operation
thyme copied to clipboard

Windows spanning across multiple screens each having different DPI and size

Open dumblob opened this issue 5 years ago • 2 comments

Please see https://github.com/vlang/ui/issues/19 .

dumblob avatar Sep 14 '20 10:09 dumblob

On the rendering side, We currently expose one global scale factor which is used throughout drawing. It would be fairly straightforward to allow individual widgets to have their own scale factor based on what monitor they are on. However, we would need to deal with the case where a single widget spans multiple monitors.

A first step to implementing this would be to allow widget drawing to be split into segments arbitrarily. We are already passing clip information along with each widget, so this actually might not be that bad. We would probably need to draw the entire widget multiple times, one for each monitor.

Given how complex monitor layouts could potentially be, tracking cursor input position would definitely be non-trivial.

As a starting point to see how feasible this is, we could try out rendering the entire UI once per monitor with appropriate clipping and scale for each, and see how hard it is to get things to "line up".

Grokmoo avatar Sep 15 '20 00:09 Grokmoo

As a starting point to see how feasible this is, we could try out rendering the entire UI once per monitor with appropriate clipping and scale for each, and see how hard it is to get things to "line up".

Sounds like a good starting point. There is something similar already here, so feel free to take a look :wink:. There is also a potential API abstracting the "monitor layouts complexity" at its lowest feasible level (yep, I'm biased on this topic :wink:).

dumblob avatar Sep 15 '20 08:09 dumblob