Allow changing resize increments after window creation
This commit is contained in:
parent
97d2aaa953
commit
ab56e9f57d
15 changed files with 213 additions and 45 deletions
|
|
@ -95,8 +95,6 @@ pub struct PlatformSpecificWindowBuilderAttributes {
|
|||
#[cfg(feature = "x11")]
|
||||
pub screen_id: Option<i32>,
|
||||
#[cfg(feature = "x11")]
|
||||
pub resize_increments: Option<Size>,
|
||||
#[cfg(feature = "x11")]
|
||||
pub base_size: Option<Size>,
|
||||
#[cfg(feature = "x11")]
|
||||
pub override_redirect: bool,
|
||||
|
|
@ -117,8 +115,6 @@ impl Default for PlatformSpecificWindowBuilderAttributes {
|
|||
#[cfg(feature = "x11")]
|
||||
screen_id: None,
|
||||
#[cfg(feature = "x11")]
|
||||
resize_increments: None,
|
||||
#[cfg(feature = "x11")]
|
||||
base_size: None,
|
||||
#[cfg(feature = "x11")]
|
||||
override_redirect: false,
|
||||
|
|
@ -391,6 +387,16 @@ impl Window {
|
|||
x11_or_wayland!(match self; Window(w) => w.set_max_inner_size(dimensions))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn resize_increments(&self) -> Option<PhysicalSize<u32>> {
|
||||
x11_or_wayland!(match self; Window(w) => w.resize_increments())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_resize_increments(&self, increments: Option<Size>) {
|
||||
x11_or_wayland!(match self; Window(w) => w.set_resize_increments(increments))
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_resizable(&self, resizable: bool) {
|
||||
x11_or_wayland!(match self; Window(w) => w.set_resizable(resizable))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue