From bcceca83ce966598e00e0319d85ec11d6df9d272 Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Tue, 30 Jun 2026 03:44:54 +0800
Subject: [PATCH] Freeze TagLauncher 8.2.8 build 20260630.0128

---
 src/Apptag/TagNavigationView.swift |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/Apptag/TagNavigationView.swift b/src/Apptag/TagNavigationView.swift
index 9086a96..ce079c7 100644
--- a/src/Apptag/TagNavigationView.swift
+++ b/src/Apptag/TagNavigationView.swift
@@ -5,6 +5,7 @@
     var id: String { name }
     let name: String
     let colorIndex: Int
+    let customColor: TagCustomColor?
 }
 
 struct TagNavigationView: NSViewRepresentable {
@@ -402,7 +403,7 @@
     }
 
     required init?(coder: NSCoder) {
-        self.item = TagNavigationItem(name: "", colorIndex: 0)
+        self.item = TagNavigationItem(name: "", colorIndex: 0, customColor: nil)
         self.orientation = .horizontal
         super.init(coder: coder)
     }
@@ -543,7 +544,7 @@
     }
 
     private func updateAppearance() {
-        let background = TagColor.nsColor(for: item.colorIndex)
+        let background = TagColor.nsColor(for: item.colorIndex, customColor: item.customColor)
         let dragScale: CGFloat = isDragging ? 1.04 : 1.0
         layer?.backgroundColor = background.cgColor
         layer?.cornerRadius = orientation == .horizontal ? 7 : 6
@@ -555,7 +556,7 @@
         layer?.setAffineTransform(CGAffineTransform(scaleX: dragScale, y: dragScale))
         alphaValue = dragModeActive ? (isDragging ? 1.0 : 0.62) : 1.0
 
-        let textColor: NSColor = (item.colorIndex == 0 || item.colorIndex == 5) ? .labelColor : .white
+        let textColor: NSColor = TagColor.prefersDarkText(for: background) ? .labelColor : .white
         let paragraph = NSMutableParagraphStyle()
         paragraph.alignment = alignment
         if orientation == .vertical {

--
Gitblit v1.9.3