mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-09-22 13:48:13 +03:00
copy cli config definition window visibility defaults (#1353)
This commit is contained in:
parent
d857a2f4fc
commit
53910ff7ac
@ -228,16 +228,24 @@ pub struct WindowConfig {
|
|||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub maximized: bool,
|
pub maximized: bool,
|
||||||
/// Whether the window is visible or not.
|
/// Whether the window is visible or not.
|
||||||
#[serde(default)]
|
#[serde(default = "default_visible")]
|
||||||
pub visible: bool,
|
pub visible: bool,
|
||||||
/// Whether the window should have borders and bars.
|
/// Whether the window should have borders and bars.
|
||||||
#[serde(default)]
|
#[serde(default = "default_decorations")]
|
||||||
pub decorations: bool,
|
pub decorations: bool,
|
||||||
/// Whether the window should always be on top of other windows.
|
/// Whether the window should always be on top of other windows.
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub always_on_top: bool,
|
pub always_on_top: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn default_visible() -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
|
fn default_decorations() -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
#[skip_serializing_none]
|
#[skip_serializing_none]
|
||||||
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
|
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize, JsonSchema)]
|
||||||
#[serde(rename_all = "camelCase", deny_unknown_fields)]
|
#[serde(rename_all = "camelCase", deny_unknown_fields)]
|
||||||
|
@ -929,7 +929,7 @@
|
|||||||
},
|
},
|
||||||
"decorations": {
|
"decorations": {
|
||||||
"description": "Whether the window should have borders and bars.",
|
"description": "Whether the window should have borders and bars.",
|
||||||
"default": false,
|
"default": true,
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"fullscreen": {
|
"fullscreen": {
|
||||||
@ -1015,7 +1015,7 @@
|
|||||||
},
|
},
|
||||||
"visible": {
|
"visible": {
|
||||||
"description": "Whether the window is visible or not.",
|
"description": "Whether the window is visible or not.",
|
||||||
"default": false,
|
"default": true,
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"width": {
|
"width": {
|
||||||
|
Loading…
Reference in New Issue
Block a user