Skip to content

Commit 23fd2e6

Browse files
committed
Update EditorAreaView.swift
1 parent ce3dd04 commit 23fd2e6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

CodeEdit/Features/Editor/Views/EditorAreaView.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ struct EditorAreaView: View {
1818

1919
@AppSettings(\.general.dimEditorsWithoutFocus)
2020
var dimEditorsWithoutFocus
21+
22+
@AppSettings(\.theme.useThemeBackground)
23+
var useThemeBackground
24+
25+
private var backgroundColor: NSColor {
26+
let fallback = NSColor.textBackgroundColor
27+
return if useThemeBackground {
28+
ThemeModel.shared.selectedTheme?.editor.background.nsColor ?? fallback
29+
} else {
30+
fallback
31+
}
32+
}
2133

2234
@ObservedObject var editor: Editor
2335

0 commit comments

Comments
 (0)