修复 macOS Retina 下窗口尺寸异常与默认窗口过小问题

This commit is contained in:
JSR
2026-03-19 21:28:02 +08:00
parent 13c9dcaa61
commit a782da9037
3 changed files with 9 additions and 6 deletions
+3 -3
View File
@@ -298,9 +298,9 @@ fn setup_tray(_app: &mut App) -> Result<(), Box<dyn std::error::Error>> {
#[cfg(desktop)]
fn setup_window_events(app: &mut App) -> Result<(), Box<dyn std::error::Error>> {
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();