修复iOS构建失败并调整初始窗口尺寸以避免底部黑边

This commit is contained in:
JSR
2026-03-19 19:08:33 +08:00
parent 24e7303040
commit c4c65861c9
3 changed files with 42 additions and 30 deletions
+6
View File
@@ -298,6 +298,12 @@ 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.center();
#[cfg(target_os = "macos")]
{
let _ = window.set_shadow(true);