From 54f1ecd865e6bb88ee3ce409e45663b50f011563 Mon Sep 17 00:00:00 2001 From: metacubex Date: Fri, 19 Aug 2022 18:08:11 +0800 Subject: [PATCH] chore: adjust StatusItem style --- ClashX/Views/StatusItemView.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ClashX/Views/StatusItemView.swift b/ClashX/Views/StatusItemView.swift index d710766..4193df4 100644 --- a/ClashX/Views/StatusItemView.swift +++ b/ClashX/Views/StatusItemView.swift @@ -54,9 +54,6 @@ class StatusItemView: NSView { } uploadSpeedLabel.font = font downloadSpeedLabel.font = font - - uploadSpeedLabel.textColor = NSColor.black - downloadSpeedLabel.textColor = NSColor.black } func updateViewStatus(enableProxy: Bool) { @@ -68,6 +65,8 @@ class StatusItemView: NSView { unselectedColor = selectedColor.withAlphaComponent(0.5) } + uploadSpeedLabel.textColor = enableProxy ? NSColor.black : NSColor.init(white: 1.0, alpha: 0.5) + downloadSpeedLabel.textColor = enableProxy ? NSColor.black : NSColor.init(white: 1.0, alpha: 0.5) imageView.image = menuImage.tint(color: enableProxy ? selectedColor : unselectedColor) updateStatusItemView() }