PCB // Add shadow for cursor.
This commit is contained in:
parent
89d07b2edd
commit
177d0c87a3
|
@ -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]
|
||||||
|
|
Loading…
Reference in New Issue