Skip to content

Commit

Permalink
✨ feat(ui): Add app icon
Browse files Browse the repository at this point in the history
  • Loading branch information
samzong committed Sep 27, 2024
1 parent dbb7801 commit fb59286
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
if let button = statusItem?.button {
button.title = "🤡"
button.target = self
button.action = #selector(toggleMenu)

This comment has been minimized.

Copy link
@samzong

samzong Sep 27, 2024

Author Owner

This is an incorrect modification

}

setupMenu()
Expand All @@ -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: "")
Expand Down
Binary file added MacMusicPlayer/AppIcon.icns
Binary file not shown.
10 changes: 6 additions & 4 deletions MacMusicPlayer/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIconFile</key>
<string>AppIcon</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
Expand All @@ -17,9 +19,9 @@
<array>
<dict/>
</array>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
</array>
</dict>
</plist>

0 comments on commit fb59286

Please sign in to comment.