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
Desktop default window size #57274
Desktop default window size #57274
Conversation
The template is just meant to be a reasonable default value. You could of course change it in your own application. |
Indeed it is just the default. I don't think anyone will actually want 800x600 and as I've seen recently in a very large flutter project, the default was never changed. I'd rather start with a more modern default, especially in a desktop app you never want 4:3 aspect. |
I picked 800x600 basically because I wanted something that would be pretty much guaranteed to fit on any desktop screen. I agree it's not a great default, but on the other hand I just checked a random stats page on desktop screen resolutions and it looks like somewhere in the vicinity of 5-10% of screens wouldn't necessarily fit 1280x720 once the areas not available for client application use were removed. So I think if we make the default larger, we'd need to add logic to check the available screen area and constrain the starting size to it if it's smaller. (Which I'm fine with, as I think that's generally useful enough to have in the template until a real Dart-based solution for managing window size is available, but it's not quite as simple a change.) |
Actually the window manager takes this as a requested resolution and if the requested size is to large it will make the app full screen. I tested this by setting it to 3840x2160 on my 1920x1080 desktop. I confirmed it did in fact just go full screen. Since it does handle this well, I'd like to go back to my original proposal to default to 1366x768. @stuartmorgan what do you think? |
I'd prefer 1280x720; if the goal is to shape how developers think about their layouts, then skewing slightly smaller has the advantage of reminding developers (who tend to have larger screens) to think about how their layout will look for people with smaller screens. Have you tested Windows? If not I can do that this afternoon. |
I don't have access to windows, I would appreciate it if you could test that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Windows behavior isn't ideal—it constrains to monitor size, without factoring in the taskbar, so the window ends up partially obscured—but it's livable for a default for now. Given that, LGTM.
Description
Checklist
///
).flutter analyze --flutter-repo
) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.