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

Derive the GUI size as a percentage of the screen, when within the [min,max] range #3812

Open
ricab opened this issue Dec 4, 2024 · 5 comments · May be fixed by #3814
Open

Derive the GUI size as a percentage of the screen, when within the [min,max] range #3812

ricab opened this issue Dec 4, 2024 · 5 comments · May be fixed by #3814
Labels
enhancement jira Create a Jira ticket for this issue medium medium importance

Comments

@ricab
Copy link
Collaborator

ricab commented Dec 4, 2024

What are you trying to do?
Resize the GUI to a sensible percentage of the screen when within a common range.

What's your proposed solution?
For screen resolutions in the range ]1024x576, 1600x900[ (exclusive on both ends), resize the GUI to the largest rectangle that is the same ratio of the screen (e.g. 16x9) and enclosed in 80% of the screen. For resolutions outside of those bounds, resize the GUI to same size as today (750x450 when below, 1400x822 when above).

When the screen size cannot be determined, resize the GUI to 750x450.

In the above, the resolution is in the range iff the corresponding rectangle encloses the lower bound and is enclosed by the higher bound (with no overlaps).

Additional context
In the future, we could consider varying the aspect ratio according to the screen, but we'd need special handling for ultra wide. Actual percentages and sizes open for adjustment (e.g. to minimize how much smaller we go when crossing the high bound).

@ricab ricab added enhancement medium medium importance labels Dec 4, 2024
@ricab ricab changed the title Derive the GUI size as a percentage of the screen, when within the [min,max] range. Derive the GUI size as a percentage of the screen, when within the [min,max] range Dec 4, 2024
@andrei-toterman
Copy link
Contributor

When the screen size cannot be determined, resize the GUI to 1024x576.

Shouldn't it be 750x450 aka the minimum if we can't determine the screen size?

@ricab
Copy link
Collaborator Author

ricab commented Dec 4, 2024

We discussed that. I thought not, but perhaps it's best if you both think that way. Feel free to edit the description then.

@andrei-toterman
Copy link
Contributor

Well, since the GUI will remember its last size, I think it's more acceptable for it to start in a small size that the user can expand than for it to start on a size that might be too big.

@ricab
Copy link
Collaborator Author

ricab commented Dec 4, 2024

I see your point. I would agree if I didn't expect most screens to have a larger size in practice, where the small GUI doesn't look very good. In the worse case, people can still resize, although it is not obvious. It is a worse situation, but one that I'd expect to be infrequent, whereas I worry that the other one may come about often.

But I don't know how often we expect this whole scenario to come about (might be worth a log). Anyway, not my preference, but I'll yield.

@andrei-toterman
Copy link
Contributor

I'm also not really sure how often this scenario can come up. My assumption is that in the vast majority of cases, determining the screen size would work without issue. I'm not even sure what could prevent the screen size from being retrieved. The implementation of that plugin just calls some standard platform methods from winapi, gtk and cocoa, which should in principle just work™

@andrei-toterman andrei-toterman added the jira Create a Jira ticket for this issue label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement jira Create a Jira ticket for this issue medium medium importance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants