Skip to content

Commit

Permalink
Issue 354: App windows size is not persistent on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
JayceFFT committed Aug 30, 2024
1 parent 48ad7e7 commit 57d70ef
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 12 deletions.
28 changes: 26 additions & 2 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ sysinfo = "0.29.10"
window-shadows = "0.2.2"
governor = "0.6.3"
nonzero_ext = "0.3.0"
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }

[features]
# by default Tauri runs in production mode
Expand Down
6 changes: 1 addition & 5 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,6 @@ const REQUIRED_FILES: &[(BaseDirectory, &str, &str)] =
#[tauri::command]
#[specta::specta]
async fn close_splashscreen(window: Window) -> Result<(), String> {
window
.get_window("main")
.expect("no window labeled 'main' found")
.maximize()
.unwrap();
window
.get_window("main")
.expect("no window labeled 'main' found")
Expand Down Expand Up @@ -289,6 +284,7 @@ fn main() {
delete_empty_games,
export_to_pgn
])
.plugin(tauri_plugin_window_state::Builder::default().build())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
Expand Down
10 changes: 5 additions & 5 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
"minimize": true,
"unmaximize": true,
"unminimize": true,
"startDragging": true,
"setFullscreen": true
"startDragging": true
}
},
"bundle": {
Expand Down Expand Up @@ -101,9 +100,10 @@
"windows": [
{
"title": "En Croissant",
"maximized": true,
"visible": false,
"decorations": false
"decorations": false,
"minWidth": 820,
"minHeight": 620
}
],
"cli": {
Expand All @@ -116,4 +116,4 @@
]
}
}
}
}

0 comments on commit 57d70ef

Please sign in to comment.