Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows spanning across multiple screens each having different DPI and size #12

Open
dumblob opened this issue Sep 14, 2020 · 2 comments

Comments

@dumblob
Copy link

dumblob commented Sep 14, 2020

Please see vlang/ui#19 .

@Grokmoo
Copy link
Owner

Grokmoo commented Sep 15, 2020

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".

@dumblob
Copy link
Author

dumblob commented Sep 15, 2020

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 😉. There is also a potential API abstracting the "monitor layouts complexity" at its lowest feasible level (yep, I'm biased on this topic 😉).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants