diff --git a/src-tauri/src/commands/window.rs b/src-tauri/src/commands/window.rs index 843e6fa..4160333 100644 --- a/src-tauri/src/commands/window.rs +++ b/src-tauri/src/commands/window.rs @@ -126,7 +126,10 @@ pub async fn window_resize( #[cfg(desktop)] if let Some(window) = app.get_webview_window("main") { window - .set_size(tauri::Size::Physical(tauri::PhysicalSize { width, height })) + .set_size(tauri::Size::Logical(tauri::LogicalSize { + width: width as f64, + height: height as f64, + })) .map_err(|e| e.to_string())?; } Ok(()) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 944630d..b4fd264 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -298,9 +298,9 @@ fn setup_tray(_app: &mut App) -> Result<(), Box> { #[cfg(desktop)] fn setup_window_events(app: &mut App) -> Result<(), Box> { if let Some(window) = app.get_webview_window("main") { - let _ = window.set_size(tauri::Size::Physical(tauri::PhysicalSize { - width: 1180, - height: 680, + let _ = window.set_size(tauri::Size::Logical(tauri::LogicalSize { + width: 1180.0, + height: 680.0, })); let _ = window.center(); diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 2b5900b..3bade52 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -15,8 +15,8 @@ "windows": [ { "title": "SecScore", - "width": 10000, - "height": 10000, + "width": 1180, + "height": 680, "resizable": true, "fullscreen": false, "decorations": false,