resizable windows (#117)

This commit is contained in:
FTCHD
2026-01-23 22:54:27 +07:00
parent 96973c15d7
commit 2ca2a2c7a8
+3 -6
View File
@@ -108,7 +108,9 @@ pub async fn open_window(
let mut builder = WebviewWindowBuilder::new(&app_handle, &name, WebviewUrl::App(url.into()))
.title(&name)
.inner_size(width, height)
.resizable(false)
.min_inner_size(700.0, 700.0)
.max_inner_size(1000.0, 1000.0)
.resizable(true)
.visible(false)
.focused(false)
.decorations(true)
@@ -153,11 +155,6 @@ pub async fn open_window(
window.show().map_err(|e| e.to_string())?;
window.set_focus().map_err(|e| e.to_string())?;
if os != "windows" && os != "macos" {
window.set_resizable(true).map_err(|e| e.to_string())?;
window.set_resizable(false).map_err(|e| e.to_string())?;
}
Ok(())
}