|
@@ -126,6 +126,10 @@ class ViewController: NSViewController {
|
|
|
var primaryText: NSColor { isDarkMode ? NSColor(calibratedWhite: 0.98, alpha: 1) : NSColor(calibratedWhite: 0.10, alpha: 1) }
|
|
var primaryText: NSColor { isDarkMode ? NSColor(calibratedWhite: 0.98, alpha: 1) : NSColor(calibratedWhite: 0.10, alpha: 1) }
|
|
|
var secondaryText: NSColor { isDarkMode ? NSColor(calibratedWhite: 0.78, alpha: 1) : NSColor(calibratedWhite: 0.30, alpha: 1) }
|
|
var secondaryText: NSColor { isDarkMode ? NSColor(calibratedWhite: 0.78, alpha: 1) : NSColor(calibratedWhite: 0.30, alpha: 1) }
|
|
|
var mutedText: NSColor { isDarkMode ? NSColor(calibratedWhite: 0.66, alpha: 1) : NSColor(calibratedWhite: 0.42, alpha: 1) }
|
|
var mutedText: NSColor { isDarkMode ? NSColor(calibratedWhite: 0.66, alpha: 1) : NSColor(calibratedWhite: 0.42, alpha: 1) }
|
|
|
|
|
+
|
|
|
|
|
+ var sidebarInactiveText: NSColor {
|
|
|
|
|
+ isDarkMode ? secondaryText : NSColor(calibratedWhite: 0.12, alpha: 1)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private final class TopAlignedClipView: NSClipView {
|
|
private final class TopAlignedClipView: NSClipView {
|
|
@@ -227,6 +231,7 @@ class ViewController: NSViewController {
|
|
|
private var primaryText: NSColor { palette.primaryText }
|
|
private var primaryText: NSColor { palette.primaryText }
|
|
|
private var secondaryText: NSColor { palette.secondaryText }
|
|
private var secondaryText: NSColor { palette.secondaryText }
|
|
|
private var mutedText: NSColor { palette.mutedText }
|
|
private var mutedText: NSColor { palette.mutedText }
|
|
|
|
|
+ private var sidebarInactiveText: NSColor { palette.sidebarInactiveText }
|
|
|
|
|
|
|
|
private let rootContainer = NSView()
|
|
private let rootContainer = NSView()
|
|
|
private var homeView: NSView?
|
|
private var homeView: NSView?
|
|
@@ -6065,7 +6070,7 @@ class ViewController: NSViewController {
|
|
|
|
|
|
|
|
let iconView = NSImageView()
|
|
let iconView = NSImageView()
|
|
|
iconView.translatesAutoresizingMaskIntoConstraints = false
|
|
iconView.translatesAutoresizingMaskIntoConstraints = false
|
|
|
- iconView.contentTintColor = selectedRow ? primaryText : secondaryText
|
|
|
|
|
|
|
+ iconView.contentTintColor = selectedRow ? primaryText : sidebarInactiveText
|
|
|
iconView.imageScaling = .scaleProportionallyUpOrDown
|
|
iconView.imageScaling = .scaleProportionallyUpOrDown
|
|
|
iconView.symbolConfiguration = NSImage.SymbolConfiguration(pointSize: 20, weight: .regular)
|
|
iconView.symbolConfiguration = NSImage.SymbolConfiguration(pointSize: 20, weight: .regular)
|
|
|
let preferredSymbol = sidebarSymbolName(for: item, filled: selectedRow)
|
|
let preferredSymbol = sidebarSymbolName(for: item, filled: selectedRow)
|
|
@@ -6074,7 +6079,7 @@ class ViewController: NSViewController {
|
|
|
?? NSImage(systemSymbolName: fallbackSymbol, accessibilityDescription: item)
|
|
?? NSImage(systemSymbolName: fallbackSymbol, accessibilityDescription: item)
|
|
|
iconContainer.addSubview(iconView)
|
|
iconContainer.addSubview(iconView)
|
|
|
|
|
|
|
|
- let label = makeLabel(item, size: 10, color: selectedRow ? primaryText : secondaryText, weight: .regular, centered: true)
|
|
|
|
|
|
|
+ let label = makeLabel(item, size: 10, color: selectedRow ? primaryText : sidebarInactiveText, weight: .regular, centered: true)
|
|
|
label.translatesAutoresizingMaskIntoConstraints = false
|
|
label.translatesAutoresizingMaskIntoConstraints = false
|
|
|
row.addSubview(label)
|
|
row.addSubview(label)
|
|
|
|
|
|
|
@@ -6135,7 +6140,7 @@ class ViewController: NSViewController {
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
let icon = makeLabel(selectedRow ? "⌂" : "◻︎", size: 15, color: primaryText, weight: .regular, centered: true)
|
|
let icon = makeLabel(selectedRow ? "⌂" : "◻︎", size: 15, color: primaryText, weight: .regular, centered: true)
|
|
|
- let label = makeLabel(item, size: 11, color: selectedRow ? primaryText : secondaryText, weight: .regular, centered: true)
|
|
|
|
|
|
|
+ let label = makeLabel(item, size: 11, color: selectedRow ? primaryText : sidebarInactiveText, weight: .regular, centered: true)
|
|
|
[icon, label].forEach {
|
|
[icon, label].forEach {
|
|
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
|
$0.translatesAutoresizingMaskIntoConstraints = false
|
|
|
row.addSubview($0)
|
|
row.addSubview($0)
|
|
@@ -6221,8 +6226,8 @@ class ViewController: NSViewController {
|
|
|
for (item, row) in homeSidebarRowViews {
|
|
for (item, row) in homeSidebarRowViews {
|
|
|
let selected = item == selectedHomeSidebarItem
|
|
let selected = item == selectedHomeSidebarItem
|
|
|
row.layer?.backgroundColor = selected ? sidebarActiveBackground.withAlphaComponent(0.95).cgColor : NSColor.clear.cgColor
|
|
row.layer?.backgroundColor = selected ? sidebarActiveBackground.withAlphaComponent(0.95).cgColor : NSColor.clear.cgColor
|
|
|
- homeSidebarLabels[item]?.textColor = selected ? primaryText : secondaryText
|
|
|
|
|
- homeSidebarIconViews[item]?.contentTintColor = selected ? primaryText : secondaryText
|
|
|
|
|
|
|
+ homeSidebarLabels[item]?.textColor = selected ? primaryText : sidebarInactiveText
|
|
|
|
|
+ homeSidebarIconViews[item]?.contentTintColor = selected ? primaryText : sidebarInactiveText
|
|
|
let preferredSymbol = sidebarSymbolName(for: item, filled: selected)
|
|
let preferredSymbol = sidebarSymbolName(for: item, filled: selected)
|
|
|
let fallbackSymbol = sidebarSymbolName(for: item, filled: false)
|
|
let fallbackSymbol = sidebarSymbolName(for: item, filled: false)
|
|
|
if let image = NSImage(systemSymbolName: preferredSymbol, accessibilityDescription: item)
|
|
if let image = NSImage(systemSymbolName: preferredSymbol, accessibilityDescription: item)
|