fix: set min window size, close #734

This commit is contained in:
GyDi 2023-08-28 15:00:27 +08:00 committed by GitHub
parent 23351c4f1c
commit 8647866a32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,7 +67,9 @@ pub fn create_window(app_handle: &AppHandle) {
Some(size_pos) if size_pos.len() == 4 => {
let size = (size_pos[0], size_pos[1]);
let pos = (size_pos[2], size_pos[3]);
builder = builder.inner_size(size.0, size.1).position(pos.0, pos.1);
let w = size.0.clamp(600.0, f64::INFINITY);
let h = size.1.clamp(520.0, f64::INFINITY);
builder = builder.inner_size(w, h).position(pos.0, pos.1);
}
_ => {
#[cfg(target_os = "windows")]