Skip to content

Commit 5f7af9f

Browse files
committed
STGutterView: Make backgroundColor optional
Make the `backgroundColor` property of `STGutterView` optional, defaulting to `nil`. This allows the background color to be customized if needed, while falling back to the default `NSColor.controlBackgroundColor` if no specific color is set.
1 parent d46f906 commit 5f7af9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/STTextViewAppKit/Gutter/STGutterView.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ open class STGutterView: NSView, NSDraggingSource {
6161
open var highlightSelectedLine: Bool = false
6262

6363
@Invalidating(.display, .background)
64-
internal var backgroundColor: NSColor = NSColor.controlBackgroundColor {
64+
internal var backgroundColor: NSColor? = nil {
6565
didSet {
66-
layer?.backgroundColor = backgroundColor.cgColor
66+
layer?.backgroundColor = backgroundColor?.cgColor
6767
}
6868
}
6969

0 commit comments

Comments
 (0)