diff --git a/AppDelegate.swift b/AppDelegate.swift index af61d7c..44640f0 100644 --- a/AppDelegate.swift +++ b/AppDelegate.swift @@ -24,7 +24,6 @@ class AppDelegate: NSObject, NSApplicationDelegate { if let button = statusItem?.button { button.title = "🤡" button.target = self - button.action = #selector(toggleMenu) } setupMenu() @@ -34,6 +33,7 @@ class AppDelegate: NSObject, NSApplicationDelegate { func setupMenu() { menu = NSMenu() menu.minimumWidth = 200 // 设置固定宽 + menu.allowsContextMenuPlugIns = true // Current track info let trackInfoItem = NSMenuItem(title: "No selected", action: nil, keyEquivalent: "") diff --git a/MacMusicPlayer/AppIcon.icns b/MacMusicPlayer/AppIcon.icns new file mode 100755 index 0000000..5849ae4 Binary files /dev/null and b/MacMusicPlayer/AppIcon.icns differ diff --git a/MacMusicPlayer/Info.plist b/MacMusicPlayer/Info.plist index 6303cf3..db9c907 100644 --- a/MacMusicPlayer/Info.plist +++ b/MacMusicPlayer/Info.plist @@ -2,6 +2,8 @@ + CFBundleIconFile + AppIcon CFBundleDocumentTypes @@ -17,9 +19,9 @@ - UIBackgroundModes - - audio - + UIBackgroundModes + + audio +