Explorar el Código

Darken light-mode sidebar text and icon colors for better contrast.

This updates sidebar section labels and unselected item/icon tints to a stronger black tone so the left navigation reads more clearly.

Made-with: Cursor
huzaifahayat12 hace 3 meses
padre
commit
5eb1d71b88
Se han modificado 1 ficheros con 8 adiciones y 5 borrados
  1. 8 5
      meetings_app/ViewController.swift

+ 8 - 5
meetings_app/ViewController.swift

@@ -5085,7 +5085,8 @@ private extension ViewController {
     }
 
     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
         return field
     }
@@ -5123,7 +5124,8 @@ private extension ViewController {
             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
 
         item.addSubview(leadingView)
@@ -5137,7 +5139,7 @@ private extension ViewController {
         ]
 
         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.alignment = .right
             item.addSubview(chevron)
@@ -5172,8 +5174,9 @@ private extension ViewController {
         let selected = (page == selectedSidebarPage)
         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
-        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 }
         let leading = item.subviews[0]
         let title = item.subviews.first { $0 is NSTextField } as? NSTextField