Skip to content

Commit d1deca5

Browse files
authored
Fix color scheme for completion panel (#115)
1 parent a3052c7 commit d1deca5

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

MarkEditMac/Modules/Sources/TextCompletion/TextCompletionContext.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ public final class TextCompletionContext {
2424
}
2525
}
2626

27+
public var appearance: NSAppearance? {
28+
get {
29+
panel.appearance
30+
}
31+
set {
32+
panel.appearance = newValue
33+
}
34+
}
35+
2736
public var fromIndex: Int = 0
2837
public var toIndex: Int = 0
2938
public var selectedText: String { panel.selectedCompletion() }

MarkEditMac/Sources/Editor/Controllers/EditorViewController+Completion.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ extension EditorViewController {
7373
extension EditorViewController {
7474
func updateCompletionPanel(isVisible: Bool) {
7575
let changed = completionContext.isPanelVisible != isVisible
76+
completionContext.appearance = view.window?.appearance
7677
completionContext.isPanelVisible = isVisible
7778

7879
if changed {

0 commit comments

Comments
 (0)