-
Notifications
You must be signed in to change notification settings - Fork 653
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
[gui] remember window size + better default sizes #3814
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3814 +/- ##
=======================================
Coverage 88.95% 88.95%
=======================================
Files 256 256
Lines 14584 14584
=======================================
Hits 12973 12973
Misses 1611 1611 ☔ View full report in Codecov by Sentry. |
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.
LGTM! Multipass now remembers my window size on KDE and resizes based on resolution.
Just checking: What happens if I'm on 1080p and I resize my window to almost fullscreen, and then I change my resolution to something smaller like 1280x720? Does Flutter automatically detect that its trying to open a window size larger than the current resolution or do we need to check for this?
Ah, good point. It does not do any of that. It just uses the last size exactly as it was. We could indeed clamp it by the screen size. |
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.
I'm getting behavior on my Framework laptop display (2256x1404) on KDE where if I open Multipass, resize it, and then close it, when I open it again it doesn't remember the window size properly anymore
framework_doesnt_remember_window_size_levkropp.webm
resetting to the previous commit has the GUI remembering the window size correctly
Interesting. For me it still works fine 🤔 I'll add some logging to help with debugging. |
Ugh, the logs do not print the actual values of |
Interesting! I see that in your second screenshot, the screen has a |
Alright, I looked through the plugin code and I can confirm that |
@levkropp, apparently on macos this does not seem to be an issue (at least in my case). My mac also has a scaleFactor of 2.0, but the returned screen size matches the one from my system settings. So perhaps this is a Linux only issue? Could you perhaps take over this PR and see if you can make it work on your scaleFactor 2.0 screen? I don't have one, so I can't test it 😅 |
fix #3812
fix #3813
MULTI-1696
MULTI-1697