Skip to content

Commit 1f9beb6

Browse files
committed
Fixed background
1 parent d62a0c1 commit 1f9beb6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Sources/CodeEditSourceEditor/Controller/TextViewController+StyleViews.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ extension TextViewController {
2323
textView.selectionManager.selectedLineBackgroundColor = getThemeBackground()
2424
textView.selectionManager.highlightSelectedLine = isEditable
2525
textView.selectionManager.insertionPointColor = theme.insertionPoint
26+
textView.enclosingScrollView?.backgroundColor = useThemeBackground ? theme.background : .clear
2627
paragraphStyle = generateParagraphStyle()
2728
textView.typingAttributes = attributesFor(nil)
2829
}
@@ -49,7 +50,7 @@ extension TextViewController {
4950
: NSColor.selectedTextBackgroundColor.withSystemEffect(.disabled)
5051
gutterView.highlightSelectedLines = isEditable
5152
gutterView.font = font.rulerFont
52-
gutterView.backgroundColor = useThemeBackground ? theme.background : .textBackgroundColor
53+
gutterView.backgroundColor = useThemeBackground ? theme.background : .windowBackgroundColor
5354
if self.isEditable == false {
5455
gutterView.selectedLineTextColor = nil
5556
gutterView.selectedLineColor = .clear
@@ -59,8 +60,6 @@ extension TextViewController {
5960
/// Style the scroll view.
6061
package func styleScrollView() {
6162
guard let scrollView = view as? NSScrollView else { return }
62-
scrollView.drawsBackground = useThemeBackground
63-
scrollView.backgroundColor = useThemeBackground ? theme.background : .clear
6463
if let contentInsets {
6564
scrollView.automaticallyAdjustsContentInsets = false
6665
scrollView.contentInsets = contentInsets

0 commit comments

Comments
 (0)