TDKCandidates // Read delegate.clientAccentColor().

This commit is contained in:
ShikiSuen 2023-11-27 21:11:06 +08:00
parent 8c70327d90
commit 9b1fdb9c69
1 changed files with 3 additions and 1 deletions

View File

@ -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
}