修复 macOS 窗口圆角显示异常

This commit is contained in:
JSR
2026-03-19 18:06:42 +08:00
parent e4a0eb1ad8
commit 6675b6d978
5 changed files with 23 additions and 2 deletions
+5
View File
@@ -298,6 +298,11 @@ 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") {
#[cfg(target_os = "macos")]
{
let _ = window.set_shadow(true);
}
let window_clone = window.clone();
window.on_window_event(move |event| {
if let WindowEvent::CloseRequested { api, .. } = event {