pub struct Settings {Show 17 fields
pub size: Size,
pub maximized: bool,
pub fullscreen: bool,
pub position: Position,
pub min_size: Option<Size>,
pub max_size: Option<Size>,
pub visible: bool,
pub resizable: bool,
pub closeable: bool,
pub minimizable: bool,
pub decorations: bool,
pub transparent: bool,
pub blur: bool,
pub level: Level,
pub icon: Option<Icon>,
pub platform_specific: PlatformSpecific,
pub exit_on_close_request: bool,
}Expand description
The window settings of an application.
Fields§
§size: SizeThe initial logical dimensions of the window.
maximized: boolWhether the window should start maximized.
fullscreen: boolWhether the window should start fullscreen.
position: PositionThe initial position of the window.
min_size: Option<Size>The minimum size of the window.
max_size: Option<Size>The maximum size of the window.
visible: boolWhether the window should be visible or not.
resizable: boolWhether the window should be resizable or not.
closeable: boolWhether the title bar has Close button or not
minimizable: boolWhether the title bar has Minimize button or not
decorations: boolWhether the window should have a border, a title bar, etc. or not.
transparent: boolWhether the window should be transparent.
blur: boolWhether the window should have blurry background.
Note that the blurry effect is applied to the transparent window. You need to enable
Settings::transparent and set a proper opacity value to the background color with
Application::style.
This option is only supported on macOS and Linux. Please read the winit document for more details.
level: LevelThe window Level.
icon: Option<Icon>The icon of the window.
platform_specific: PlatformSpecificPlatform specific settings.
exit_on_close_request: boolWhether the window will close when the user requests it, e.g. when a user presses the close button.
This can be useful if you want to have some behavior that executes before the window is
actually destroyed. If you disable this, you must manually close the window with the
window::close command.
By default this is enabled.