fix: fixed combined modules selector icons color when the light mode is enabled (added watcher for dark/light mode)

This commit is contained in:
Serhiy Mytrovtsiy
2023-02-17 16:49:16 +01:00
parent 03e37cfc4a
commit a71bb9b1ce

View File

@@ -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()
}