macOS: Implement with_resize_increments (#519)

Fixes #135
This commit is contained in:
Francesca Frangipane 2018-05-16 10:16:36 -04:00 committed by GitHub
parent 2464a135b3
commit 8440091a4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 13 deletions

View file

@ -199,9 +199,9 @@ pub trait WindowBuilderExt {
fn with_x11_screen(self, screen_id: i32) -> WindowBuilder;
/// Build window with resize increment hint. Only implemented on X11.
fn with_resize_increments(self, width_inc: i32, height_inc: i32) -> WindowBuilder;
fn with_resize_increments(self, width_inc: u32, height_inc: u32) -> WindowBuilder;
/// Build window with base size hint. Only implemented on X11.
fn with_base_size(self, base_width: i32, base_height: i32) -> WindowBuilder;
fn with_base_size(self, base_width: u32, base_height: u32) -> WindowBuilder;
}
impl WindowBuilderExt for WindowBuilder {
@ -220,13 +220,13 @@ impl WindowBuilderExt for WindowBuilder {
}
#[inline]
fn with_resize_increments(mut self, width_inc: i32, height_inc: i32) -> WindowBuilder {
fn with_resize_increments(mut self, width_inc: u32, height_inc: u32) -> WindowBuilder {
self.platform_specific.resize_increments = Some((width_inc, height_inc));
self
}
#[inline]
fn with_base_size(mut self, base_width: i32, base_height: i32) -> WindowBuilder {
fn with_base_size(mut self, base_width: u32, base_height: u32) -> WindowBuilder {
self.platform_specific.base_size = Some((base_width, base_height));
self
}