-
Notifications
You must be signed in to change notification settings - Fork 568
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
'resizable' and 'show_titlebar' options #587
Conversation
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.
Looks good, a few little things but overall happy to merge this. :)
@@ -415,6 +429,18 @@ impl WindowHandle { | |||
} | |||
} | |||
|
|||
pub fn set_resizable(&self, resizable: bool) { |
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.
In general we expect the various platform WindowHandle
and other types to be used through the shared WindowHandle
struct in druid-shell/src/window.rs
, and so I would add these methods there, wrapping the method on each platform type; this will require you to add stubs of these methods to the other platforms.
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.
Uh, I already added the stubs for other platforms, so it should be enough to add the two methods to the WindowHandle right?
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 saw you had the methods for builder, but I didn't see them for WindowHandle? I might have missed it. :)
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.
Yep you're right, I missed the WindowHandle, adding it now
druid-shell/src/window.rs
Outdated
self.0.resizable(resizable) | ||
} | ||
|
||
/// Set wheter the window should have a titlebar and decorations |
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.
/// Set wheter the window should have a titlebar and decorations | |
/// Set whether the window should have a titlebar and decorations |
druid-shell/src/window.rs
Outdated
@@ -213,6 +213,16 @@ impl WindowBuilder { | |||
self.0.set_size(size) | |||
} | |||
|
|||
/// Set wheter the window should be resizable |
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.
/// Set wheter the window should be resizable | |
/// Set whether the window should be resizable |
CI looks good, anything else you want me to look at? |
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.
Looks good, thanks!
This PR solves #427 for linux only. I created the needed functions on windows and mac too, but they are not used in the 'build' function, so for now they do nothing.