From a71bb9b1ced9b3ff394c74ecb9ccfc5923d795dc Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Fri, 17 Feb 2023 16:49:16 +0100 Subject: [PATCH] fix: fixed combined modules selector icons color when the light mode is enabled (added watcher for dark/light mode) --- Stats/Views/AppSettings.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Stats/Views/AppSettings.swift b/Stats/Views/AppSettings.swift index 855542b0..de25aec1 100644 --- a/Stats/Views/AppSettings.swift +++ b/Stats/Views/AppSettings.swift @@ -563,7 +563,7 @@ internal class ModulePreview: NSStackView { self.spacing = 0 self.imageView.image = icon - self.imageView.contentTintColor = .textBackgroundColor + self.imageView.contentTintColor = self.isDarkMode ? .textBackgroundColor : .textColor self.addArrangedSubview(self.imageView) @@ -584,6 +584,10 @@ internal class ModulePreview: NSStackView { fatalError("init(coder:) has not been implemented") } + override func updateLayer() { + self.imageView.contentTintColor = self.isDarkMode ? .textBackgroundColor : .textColor + } + override func mouseEntered(with: NSEvent) { NSCursor.pointingHand.set() }