From 9b1fdb9c6966a7098746bb5cd883e7dbe307972e Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 27 Nov 2023 21:11:06 +0800 Subject: [PATCH] TDKCandidates // Read delegate.clientAccentColor(). --- .../TDKCandidates/VwrCandidateTDK_Appkit.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Packages/vChewing_CandidateWindow/Sources/CandidateWindow/TDKCandidates/VwrCandidateTDK_Appkit.swift b/Packages/vChewing_CandidateWindow/Sources/CandidateWindow/TDKCandidates/VwrCandidateTDK_Appkit.swift index 6cc99ce3..d1ae1006 100644 --- a/Packages/vChewing_CandidateWindow/Sources/CandidateWindow/TDKCandidates/VwrCandidateTDK_Appkit.swift +++ b/Packages/vChewing_CandidateWindow/Sources/CandidateWindow/TDKCandidates/VwrCandidateTDK_Appkit.swift @@ -75,7 +75,9 @@ public extension VwrCandidateTDKAppKit { let allCells = thePool.candidateLines[thePool.lineRangeForCurrentPage].flatMap { $0 } allCells.forEach { currentCell in if currentCell.isHighlighted, !cellHighlightedDrawn { - currentCell.themeColorCocoa.setFill() + let alphaRatio = NSApplication.isDarkMode ? 0.75 : 1 + let themeColor = controller?.delegate?.clientAccentColor?.withAlphaComponent(alphaRatio) + (themeColor ?? currentCell.themeColorCocoa).setFill() NSBezierPath(roundedRect: sizesCalculated.highlightedCandidate, xRadius: cellRadius, yRadius: cellRadius).fill() cellHighlightedDrawn = true }