From 8f5fdcdec66ad897380fa7389120d6bd129f8751 Mon Sep 17 00:00:00 2001 From: qinyuhang Date: Mon, 3 Oct 2016 12:31:06 +0800 Subject: [PATCH] disable show MODE on system bar disable show MODE on system bar, current solution is taking too much space, we need new solution --- ShadowsocksX-NG/AppDelegate.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ShadowsocksX-NG/AppDelegate.swift b/ShadowsocksX-NG/AppDelegate.swift index eb2e55d..200df77 100644 --- a/ShadowsocksX-NG/AppDelegate.swift +++ b/ShadowsocksX-NG/AppDelegate.swift @@ -61,7 +61,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele // let newInstance = PingTest.init(hostName: "www.baidu.com") // newInstance.start() let SerMgr = ServerProfileManager.instance - let pingServerQueue : DispatchQueue = DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.high); + let pingServerQueue : DispatchQueue = DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.high) for profile in SerMgr.profiles { let host = profile.serverHost @@ -544,9 +544,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele } else if mode == "manual" { statusItem?.title = "Manual".localized } - let titleWidth = statusItem?.title!.size(withAttributes: [NSFontAttributeName: statusItem?.button!.font!]).width + let titleWidth:CGFloat = 0//statusItem?.title!.size(withAttributes: [NSFontAttributeName: statusItem?.button!.font!]).width//这里不包含IP白名单模式等等,需要重新调整//PS还是给上游加上白名单模式? let imageWidth:CGFloat = 22 - statusItem?.length = titleWidth! + imageWidth + statusItem?.length = titleWidth + imageWidth } func updateMainMenu() {