Struct tauri_utils::config::WindowConfig
source · pub struct WindowConfig {Show 28 fields
pub label: String,
pub url: WindowUrl,
pub user_agent: Option<String>,
pub file_drop_enabled: bool,
pub center: bool,
pub x: Option<f64>,
pub y: Option<f64>,
pub width: f64,
pub height: f64,
pub min_width: Option<f64>,
pub min_height: Option<f64>,
pub max_width: Option<f64>,
pub max_height: Option<f64>,
pub resizable: bool,
pub title: String,
pub fullscreen: bool,
pub focus: bool,
pub transparent: bool,
pub maximized: bool,
pub visible: bool,
pub decorations: bool,
pub always_on_top: bool,
pub skip_taskbar: bool,
pub theme: Option<Theme>,
pub title_bar_style: TitleBarStyle,
pub hidden_title: bool,
pub accept_first_mouse: bool,
pub tabbing_identifier: Option<String>,
}
Expand description
The window configuration object.
Fields
label: String
The window identifier. It must be alphanumeric.
url: WindowUrl
The window webview URL.
user_agent: Option<String>
The user agent for the webview
file_drop_enabled: bool
Whether the file drop is enabled or not on the webview. By default it is enabled.
Disabling it is required to use drag and drop on the frontend on Windows.
center: bool
Whether or not the window starts centered or not.
x: Option<f64>
The horizontal position of the window’s top left corner
y: Option<f64>
The vertical position of the window’s top left corner
width: f64
The window width.
height: f64
The window height.
min_width: Option<f64>
The min window width.
min_height: Option<f64>
The min window height.
max_width: Option<f64>
The max window width.
max_height: Option<f64>
The max window height.
resizable: bool
Whether the window is resizable or not.
title: String
The window title.
fullscreen: bool
Whether the window starts as fullscreen or not.
focus: bool
Whether the window will be initially focused or not.
transparent: bool
Whether the window is transparent or not.
Note that on macOS
this requires the macos-private-api
feature flag, enabled under tauri > macOSPrivateApi
.
WARNING: Using private APIs on macOS
prevents your application from being accepted to the App Store
.
maximized: bool
Whether the window is maximized or not.
visible: bool
Whether the window is visible or not.
decorations: bool
Whether the window should have borders and bars.
always_on_top: bool
Whether the window should always be on top of other windows.
skip_taskbar: bool
If true
, hides the window icon from the taskbar on Windows and Linux.
theme: Option<Theme>
The initial window theme. Defaults to the system theme. Only implemented on Windows and macOS 10.14+.
title_bar_style: TitleBarStyle
The style of the macOS title bar.
If true
, sets the window title to be hidden on macOS.
accept_first_mouse: bool
Whether clicking an inactive window also clicks through to the webview on macOS.
tabbing_identifier: Option<String>
Defines the window tabbing identifier for macOS.
Windows with matching tabbing identifiers will be grouped together. If the tabbing identifier is not set, automatic tabbing will be disabled.
Trait Implementations
sourceimpl Clone for WindowConfig
impl Clone for WindowConfig
sourcefn clone(&self) -> WindowConfig
fn clone(&self) -> WindowConfig
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more