[object Object]

โ† back to Ticket System

Revert "Ticket desktop bar: add night/day theme toggle (๐ŸŒ™/โ˜€๏ธ button)"

e14da0a3054f3b5f679602aeb2a32a8c20c8e16e ยท 2026-09-03 10:21:20 -0700 ยท Steve Abrams

This reverts commit 61e600af61cab4f420f8b93b7392cac8387d17fb.

Files touched

Diff

commit e14da0a3054f3b5f679602aeb2a32a8c20c8e16e
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Sep 3 10:21:20 2026 -0700

    Revert "Ticket desktop bar: add night/day theme toggle (๐ŸŒ™/โ˜€๏ธ button)"
    
    This reverts commit 61e600af61cab4f420f8b93b7392cac8387d17fb.
---
 desktop-bar/TicketBar.swift | 51 +++++++--------------------------------------
 1 file changed, 8 insertions(+), 43 deletions(-)

diff --git a/desktop-bar/TicketBar.swift b/desktop-bar/TicketBar.swift
index 097a0259..83e305b8 100644
--- a/desktop-bar/TicketBar.swift
+++ b/desktop-bar/TicketBar.swift
@@ -74,9 +74,6 @@ private final class BarController: NSObject, NSApplicationDelegate, NSWindowDele
   private let latest = NSTextField(labelWithString: "Latest ยท โ€”")
   private var stack: NSStackView!
   private var tiles: [BarTile] = []
-  private var openButton: NSButton!
-  private var themeButton: NSButton!
-  private var isNight = true
   private var statusDetails: [String: [String]] = [:]
   private var workingDetails: [String] = []
   private var latestDetail = "No activity yet"
@@ -107,14 +104,18 @@ private final class BarController: NSObject, NSApplicationDelegate, NSWindowDele
     panel.hasShadow = true
     panel.hidesOnDeactivate = false
 
-    isNight = UserDefaults.standard.object(forKey: "ticketBarNight") as? Bool ?? true
     let countLabels = [openLabel, blockedLabel, doingLabel]
     for label in countLabels + [working, latest] {
+      label.textColor = .white
       label.font = .systemFont(ofSize: 12, weight: countLabels.contains(label) ? .bold : .medium)
       label.lineBreakMode = .byTruncatingTail
       label.maximumNumberOfLines = 1
     }
-    // Text/tile/panel colors are theme-driven โ€” see applyTheme().
+    openLabel.textColor    = NSColor(calibratedRed: 0.31, green: 0.63, blue: 1.00, alpha: 1) // blue
+    blockedLabel.textColor = NSColor(calibratedRed: 0.88, green: 0.42, blue: 0.46, alpha: 1) // red
+    doingLabel.textColor   = NSColor(calibratedRed: 0.43, green: 0.70, blue: 0.95, alpha: 1) // light blue
+    working.textColor = NSColor(calibratedRed: 0.45, green: 0.78, blue: 1, alpha: 1)
+    latest.textColor = NSColor(calibratedWhite: 0.72, alpha: 1)
 
     let savedWidths = UserDefaults.standard.dictionary(forKey: "ticketBarWidths") as? [String: CGFloat] ?? [:]
     // OPEN / BLOCKED / DOING are now THREE separate tiles โ€” each opens its own
@@ -139,19 +140,14 @@ private final class BarController: NSObject, NSApplicationDelegate, NSWindowDele
     }
     let open = NSButton(title: "Open Fleet โ†—", target: self, action: #selector(openViewer))
     open.bezelStyle = .inline
-    openButton = open
-    themeButton = NSButton(title: isNight ? "๐ŸŒ™" : "โ˜€๏ธ", target: self, action: #selector(toggleTheme))
-    themeButton.bezelStyle = .inline
-    themeButton.isBordered = false
-    themeButton.toolTip = "Toggle night / day"
-    stack = NSStackView(views: tiles + [open, themeButton])
+    open.contentTintColor = .white
+    stack = NSStackView(views: tiles + [open])
     stack.orientation = .horizontal
     stack.spacing = 6
     stack.alignment = .centerY
     stack.distribution = .fill
     for tile in tiles { tile.setContentCompressionResistancePriority(.defaultLow, for: .horizontal) }
     open.setContentHuggingPriority(.required, for: .horizontal)
-    themeButton.setContentHuggingPriority(.required, for: .horizontal)
 
     // Center the tile group horizontally in the full-width bar (was left-anchored).
     let container = NSView()
@@ -165,41 +161,10 @@ private final class BarController: NSObject, NSApplicationDelegate, NSWindowDele
     ])
     panel.contentView = container
     installDragMonitor()
-    applyTheme()
     reposition()
     panel.orderFrontRegardless()
   }
 
-  @objc private func toggleTheme() {
-    isNight.toggle()
-    UserDefaults.standard.set(isNight, forKey: "ticketBarNight")
-    applyTheme()
-  }
-
-  // Night = dark bar (default), Day = light bar. Toggled by the ๐ŸŒ™/โ˜€๏ธ button.
-  private func applyTheme() {
-    let night = isNight
-    panel.backgroundColor = night ? NSColor(calibratedWhite: 0.055, alpha: 0.97)
-                                  : NSColor(calibratedWhite: 0.95, alpha: 0.98)
-    let tileBG = (night ? NSColor(calibratedWhite: 0.11, alpha: 0.90)
-                        : NSColor(calibratedWhite: 0.86, alpha: 0.95)).cgColor
-    for tile in tiles { tile.layer?.backgroundColor = tileBG }
-    openLabel.textColor    = night ? NSColor(calibratedRed: 0.31, green: 0.63, blue: 1.00, alpha: 1)
-                                    : NSColor(calibratedRed: 0.13, green: 0.38, blue: 0.82, alpha: 1)
-    blockedLabel.textColor = night ? NSColor(calibratedRed: 0.88, green: 0.42, blue: 0.46, alpha: 1)
-                                    : NSColor(calibratedRed: 0.74, green: 0.18, blue: 0.22, alpha: 1)
-    doingLabel.textColor   = night ? NSColor(calibratedRed: 0.43, green: 0.70, blue: 0.95, alpha: 1)
-                                    : NSColor(calibratedRed: 0.16, green: 0.44, blue: 0.72, alpha: 1)
-    working.textColor      = night ? NSColor(calibratedRed: 0.45, green: 0.78, blue: 1.00, alpha: 1)
-                                    : NSColor(calibratedRed: 0.10, green: 0.45, blue: 0.82, alpha: 1)
-    latest.textColor       = night ? NSColor(calibratedWhite: 0.72, alpha: 1)
-                                    : NSColor(calibratedWhite: 0.30, alpha: 1)
-    openButton?.contentTintColor = night ? .white : NSColor(calibratedWhite: 0.15, alpha: 1)
-    themeButton?.title = night ? "๐ŸŒ™" : "โ˜€๏ธ"
-    panel.invalidateShadow()
-    panel.contentView?.needsDisplay = true
-  }
-
   private func installDragMonitor() {
     guard dragMonitor == nil else { return }
     dragMonitor = NSEvent.addLocalMonitorForEvents(matching: [.leftMouseDown, .leftMouseDragged, .leftMouseUp]) { [weak self] event in

โ† 2fb6496c Log TK-11180 yoloforever cycle  ยท  back to Ticket System  ยท  Reapply "Ticket desktop bar: add night/day theme toggle (๐ŸŒ™/ 26d90c02 โ†’