Windows & X11: Window::set_resizable (#558)
* Windows: Window::set_resizable * X11: Window::set_resizable * Code style regarding resizable * X11: set_resizable remember max/min window size * Stub out set_resizable on Android, iOS, and emscripten * remove comment block from docs * Windows: set_resizable in fullscreen * Special case Xfwm * Added fun provisos to docs
This commit is contained in:
parent
2b4b64f499
commit
be5a2b0e87
11 changed files with 155 additions and 26 deletions
|
|
@ -51,9 +51,14 @@ impl WindowBuilder {
|
|||
|
||||
/// Sets whether the window is resizable or not
|
||||
///
|
||||
/// Note that making the window unresizable doesn't exempt you from handling `Resized`, as that event can still be
|
||||
/// triggered by DPI scaling, entering fullscreen mode, etc.
|
||||
///
|
||||
/// ## Platform-specific
|
||||
///
|
||||
/// This only has an effect on Windows, X11, and macOS.
|
||||
/// This only has an effect on desktop platforms.
|
||||
///
|
||||
/// Due to a bug in XFCE, this has no effect on Xfwm.
|
||||
#[inline]
|
||||
pub fn with_resizable(mut self, resizable: bool) -> WindowBuilder {
|
||||
self.window.resizable = resizable;
|
||||
|
|
@ -317,6 +322,21 @@ impl Window {
|
|||
self.window.set_max_dimensions(dimensions)
|
||||
}
|
||||
|
||||
/// Sets whether the window is resizable or not.
|
||||
///
|
||||
/// Note that making the window unresizable doesn't exempt you from handling `Resized`, as that event can still be
|
||||
/// triggered by DPI scaling, entering fullscreen mode, etc.
|
||||
///
|
||||
/// ## Platform-specific
|
||||
///
|
||||
/// This only has an effect on desktop platforms.
|
||||
///
|
||||
/// Due to a bug in XFCE, this has no effect on Xfwm.
|
||||
#[inline]
|
||||
pub fn set_resizable(&self, resizable: bool) {
|
||||
self.window.set_resizable(resizable)
|
||||
}
|
||||
|
||||
/// DEPRECATED. Gets the native platform specific display for this window.
|
||||
/// This is typically only required when integrating with
|
||||
/// other libraries that need this information.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue