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

Give windows a sensible default size #90

Open
stackotter opened this issue Apr 9, 2024 · 4 comments
Open

Give windows a sensible default size #90

stackotter opened this issue Apr 9, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@stackotter
Copy link
Owner

At the moment windows default to the smallest possible size (under most backends). It'd be much nicer if they defaulted to some more sensible dimension such as 800x400 or something.

Any suggestions for default dimensions/aspect ratios?

@stackotter stackotter added the enhancement New feature or request label Apr 9, 2024
@ichordev
Copy link

Would it be practical to have the window size be calculated based on the initially visible views?

@stackotter
Copy link
Owner Author

At the moment it kinda works like that (although that's just a result of not specifying a default window size, and letting each UI framework do whatever it wants). The main issue is that if you have a window that only contains Text("Hello, World!") then you get a tiny little window that is as small as it can possibly be (which in my eyes isn't a great default, although maybe other people think otherwise).

Using the 'natural size' of the window's initial contents in conjunction with some other factors such as a minimum default size etc could work well, although it's tricky to compute the size of an initial view in general (since it's backend specific and often UI frameworks adjust the sizes of views based on available space, making a feedback loop if you use content size to adjust the window size).

@warmachinesocial
Copy link

To be honest just have fixed window size the above could work

@stackotter
Copy link
Owner Author

Yeah, probably quite a sensible default at least

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

No branches or pull requests

3 participants