From 2b131935aca2d139ac29eeec44ac4ecd6e6e8480 Mon Sep 17 00:00:00 2001 From: tisfeng Date: Tue, 30 Jan 2024 13:17:52 +0800 Subject: [PATCH] perf: rename menu bar icon --- .../Contents.json | 0 .../rounded.png | Bin .../Contents.json | 0 .../square.png | Bin Easydict/Feature/StatusItem/EZMenuItemManager.m | 4 ++-- Easydict/NewApp/EasydictApp.swift | 4 ++-- 6 files changed, 4 insertions(+), 4 deletions(-) rename Easydict/App/Assets.xcassets/menu-icon/{status_icon_debug.imageset => rounded_menu_bar_icon.imageset}/Contents.json (100%) rename Easydict/App/Assets.xcassets/menu-icon/{status_icon_debug.imageset => rounded_menu_bar_icon.imageset}/rounded.png (100%) rename Easydict/App/Assets.xcassets/menu-icon/{status_icon.imageset => square_menu_bar_icon.imageset}/Contents.json (100%) rename Easydict/App/Assets.xcassets/menu-icon/{status_icon.imageset => square_menu_bar_icon.imageset}/square.png (100%) diff --git a/Easydict/App/Assets.xcassets/menu-icon/status_icon_debug.imageset/Contents.json b/Easydict/App/Assets.xcassets/menu-icon/rounded_menu_bar_icon.imageset/Contents.json similarity index 100% rename from Easydict/App/Assets.xcassets/menu-icon/status_icon_debug.imageset/Contents.json rename to Easydict/App/Assets.xcassets/menu-icon/rounded_menu_bar_icon.imageset/Contents.json diff --git a/Easydict/App/Assets.xcassets/menu-icon/status_icon_debug.imageset/rounded.png b/Easydict/App/Assets.xcassets/menu-icon/rounded_menu_bar_icon.imageset/rounded.png similarity index 100% rename from Easydict/App/Assets.xcassets/menu-icon/status_icon_debug.imageset/rounded.png rename to Easydict/App/Assets.xcassets/menu-icon/rounded_menu_bar_icon.imageset/rounded.png diff --git a/Easydict/App/Assets.xcassets/menu-icon/status_icon.imageset/Contents.json b/Easydict/App/Assets.xcassets/menu-icon/square_menu_bar_icon.imageset/Contents.json similarity index 100% rename from Easydict/App/Assets.xcassets/menu-icon/status_icon.imageset/Contents.json rename to Easydict/App/Assets.xcassets/menu-icon/square_menu_bar_icon.imageset/Contents.json diff --git a/Easydict/App/Assets.xcassets/menu-icon/status_icon.imageset/square.png b/Easydict/App/Assets.xcassets/menu-icon/square_menu_bar_icon.imageset/square.png similarity index 100% rename from Easydict/App/Assets.xcassets/menu-icon/status_icon.imageset/square.png rename to Easydict/App/Assets.xcassets/menu-icon/square_menu_bar_icon.imageset/square.png diff --git a/Easydict/Feature/StatusItem/EZMenuItemManager.m b/Easydict/Feature/StatusItem/EZMenuItemManager.m index 9f40e3fc9..81497fd5e 100644 --- a/Easydict/Feature/StatusItem/EZMenuItemManager.m +++ b/Easydict/Feature/StatusItem/EZMenuItemManager.m @@ -83,9 +83,9 @@ - (void)setup { NSStatusBarButton *button = statusItem.button; #if DEBUG - NSImage *image = [NSImage imageNamed:@"status_icon_debug"]; + NSImage *image = [NSImage imageNamed:@"rounded_menu_bar_icon"]; #else - NSImage *image = [NSImage imageNamed:@"status_icon"]; + NSImage *image = [NSImage imageNamed:@"square_menu_bar_icon"]; #endif [button setImage:image]; diff --git a/Easydict/NewApp/EasydictApp.swift b/Easydict/NewApp/EasydictApp.swift index d6dfdb2f3..95e985b93 100644 --- a/Easydict/NewApp/EasydictApp.swift +++ b/Easydict/NewApp/EasydictApp.swift @@ -70,6 +70,6 @@ extension Bool { enum MenuBarIconType: String, CaseIterable, Defaults.Serializable, Identifiable { var id: Self { self } - case square = "status_icon" - case rounded = "status_icon_debug" + case square = "square_menu_bar_icon" + case rounded = "rounded_menu_bar_icon" }