ctlCandUniv // Ensure color palettes on macOS 10.13 and earlier.

This commit is contained in:
ShikiSuen 2022-08-18 14:40:59 +08:00
parent fb2bb4e0b7
commit 2316309d4d
1 changed files with 5 additions and 1 deletions

View File

@ -168,7 +168,11 @@ private class vwrCandidateUniversal: NSView {
result = NSColor.systemBlue
default: break
}
let blendingAgainstTarget: NSColor = IME.isDarkMode ? NSColor.black : NSColor.white
var blendingAgainstTarget: NSColor = IME.isDarkMode ? NSColor.black : NSColor.white
if #unavailable(macOS 10.14) {
colorBlendAmount = 0.3
blendingAgainstTarget = NSColor.white
}
return result.blended(withFraction: colorBlendAmount, of: blendingAgainstTarget)!
}