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

'resizable' and 'show_titlebar' options #587

Merged
merged 8 commits into from
Mar 1, 2020

Conversation

Psykopear
Copy link
Contributor

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.

Copy link
Member

@cmyr cmyr left a 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) {
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

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. :)

Copy link
Contributor Author

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

self.0.resizable(resizable)
}

/// Set wheter the window should have a titlebar and decorations
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Set wheter the window should have a titlebar and decorations
/// Set whether the window should have a titlebar and decorations

@@ -213,6 +213,16 @@ impl WindowBuilder {
self.0.set_size(size)
}

/// Set wheter the window should be resizable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Set wheter the window should be resizable
/// Set whether the window should be resizable

@Psykopear
Copy link
Contributor Author

CI looks good, anything else you want me to look at?

Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@cmyr cmyr merged commit 9096c27 into linebender:master Mar 1, 2020
@Psykopear Psykopear deleted the resizable-decorated-options branch March 1, 2020 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants