|
@@ -5085,7 +5085,8 @@ private extension ViewController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func sidebarSectionTitle(_ text: String) -> NSTextField {
|
|
func sidebarSectionTitle(_ text: String) -> NSTextField {
|
|
|
- let field = textLabel(text, font: typography.sidebarSection, color: palette.textMuted)
|
|
|
|
|
|
|
+ let sectionColor = darkModeEnabled ? palette.textMuted : NSColor(calibratedWhite: 0.14, alpha: 1.0)
|
|
|
|
|
+ let field = textLabel(text, font: typography.sidebarSection, color: sectionColor)
|
|
|
field.alignment = .left
|
|
field.alignment = .left
|
|
|
return field
|
|
return field
|
|
|
}
|
|
}
|
|
@@ -5123,7 +5124,8 @@ private extension ViewController {
|
|
|
leadingView = textLabel(icon, font: typography.sidebarIcon, color: palette.textSecondary)
|
|
leadingView = textLabel(icon, font: typography.sidebarIcon, color: palette.textSecondary)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- let titleLabel = textLabel(text, font: typography.sidebarItem, color: palette.textSecondary)
|
|
|
|
|
|
|
+ let baseSidebarTextColor = darkModeEnabled ? palette.textSecondary : NSColor(calibratedWhite: 0.08, alpha: 1.0)
|
|
|
|
|
+ let titleLabel = textLabel(text, font: typography.sidebarItem, color: baseSidebarTextColor)
|
|
|
titleLabel.alignment = .left
|
|
titleLabel.alignment = .left
|
|
|
|
|
|
|
|
item.addSubview(leadingView)
|
|
item.addSubview(leadingView)
|
|
@@ -5137,7 +5139,7 @@ private extension ViewController {
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
if showsDisclosure {
|
|
if showsDisclosure {
|
|
|
- let chevron = textLabel("›", font: NSFont.systemFont(ofSize: 22, weight: .semibold), color: palette.textSecondary)
|
|
|
|
|
|
|
+ let chevron = textLabel("›", font: NSFont.systemFont(ofSize: 22, weight: .semibold), color: baseSidebarTextColor)
|
|
|
chevron.translatesAutoresizingMaskIntoConstraints = false
|
|
chevron.translatesAutoresizingMaskIntoConstraints = false
|
|
|
chevron.alignment = .right
|
|
chevron.alignment = .right
|
|
|
item.addSubview(chevron)
|
|
item.addSubview(chevron)
|
|
@@ -5172,8 +5174,9 @@ private extension ViewController {
|
|
|
let selected = (page == selectedSidebarPage)
|
|
let selected = (page == selectedSidebarPage)
|
|
|
let hoverColor = darkModeEnabled ? NSColor(calibratedWhite: 1, alpha: 0.07) : NSColor(calibratedWhite: 0, alpha: 0.08)
|
|
let hoverColor = darkModeEnabled ? NSColor(calibratedWhite: 1, alpha: 0.07) : NSColor(calibratedWhite: 0, alpha: 0.08)
|
|
|
item.layer?.backgroundColor = (selected ? palette.primaryBlue : (hovering ? hoverColor : NSColor.clear)).cgColor
|
|
item.layer?.backgroundColor = (selected ? palette.primaryBlue : (hovering ? hoverColor : NSColor.clear)).cgColor
|
|
|
- let tint = selected ? NSColor.white : palette.textSecondary
|
|
|
|
|
- let sidebarIconTint = darkModeEnabled ? tint : NSColor.black
|
|
|
|
|
|
|
+ let baseSidebarTextColor = darkModeEnabled ? palette.textSecondary : NSColor(calibratedWhite: 0.08, alpha: 1.0)
|
|
|
|
|
+ let tint = selected ? NSColor.white : baseSidebarTextColor
|
|
|
|
|
+ let sidebarIconTint = darkModeEnabled ? tint : baseSidebarTextColor
|
|
|
guard item.subviews.count >= 2 else { return }
|
|
guard item.subviews.count >= 2 else { return }
|
|
|
let leading = item.subviews[0]
|
|
let leading = item.subviews[0]
|
|
|
let title = item.subviews.first { $0 is NSTextField } as? NSTextField
|
|
let title = item.subviews.first { $0 is NSTextField } as? NSTextField
|