Skip to content

Commit

Permalink
PCB // Add shadow for cursor.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShikiSuen committed Feb 12, 2024
1 parent 89d07b2 commit 177d0c8
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,15 @@ public class PopupCompositionBuffer: NSWindowController {
)

var cursorAttributes: [NSAttributedString.Key: Any] {
let shadow = NSShadow()
shadow.shadowBlurRadius = 4
shadow.shadowOffset.height = 1
shadow.shadowColor = .black
var result: [NSAttributedString.Key: Any] = [
.kern: -18,
.font: bufferFont(),
.foregroundColor: textColor,
.shadow: shadow,
]
if isTypingDirectionVertical {
result[.paragraphStyle] = verticalAttributes[.paragraphStyle]
Expand Down

0 comments on commit 177d0c8

Please sign in to comment.