-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Allow setting windows size based on monitor size #3065
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
base: master
Are you sure you want to change the base?
Conversation
|
I think you could use |
I did in the original PR, but for the tester I need to support closures, since I need to make the window wider than it would otherwise be: Lines 67 to 72 in 0a34496
Lines 56 to 67 in a9ac8ba
The only other solution I could think of, would be to ignore the variable window size when the tester is used. |
|
Hmm You could add an extra field to the variant which contains extra size, but that could make it a bit confusing to use, or just plain ugly. |
The current API isn't really all user friendly either. @pml68 What do you think about creating a wrapper struct to hide the enum variants? pub struct Size( pub(crate) SizeVariant)Not sure these enum in struct types fir with the iced style. |
Hmm not sure honestly. I can't really think of a better way, but I wonder what Héctor would think about the proposed solutions (user has to |
This just adds the
FromScreensizeoption to the window settings size.I used the positioning option as a base.
I use this for my drowdown terminal, so the window size is automatically set.