PCB // Add shadow for cursor.

This commit is contained in:
ShikiSuen 2024-02-12 14:26:37 +08:00
parent 89d07b2edd
commit 177d0c87a3
1 changed files with 5 additions and 0 deletions

View File

@ -157,10 +157,15 @@ public class PopupCompositionBuffer: NSWindowController {
) )
var cursorAttributes: [NSAttributedString.Key: Any] { var cursorAttributes: [NSAttributedString.Key: Any] {
let shadow = NSShadow()
shadow.shadowBlurRadius = 4
shadow.shadowOffset.height = 1
shadow.shadowColor = .black
var result: [NSAttributedString.Key: Any] = [ var result: [NSAttributedString.Key: Any] = [
.kern: -18, .kern: -18,
.font: bufferFont(), .font: bufferFont(),
.foregroundColor: textColor, .foregroundColor: textColor,
.shadow: shadow,
] ]
if isTypingDirectionVertical { if isTypingDirectionVertical {
result[.paragraphStyle] = verticalAttributes[.paragraphStyle] result[.paragraphStyle] = verticalAttributes[.paragraphStyle]