Skip to content

Commit 3edf6dc

Browse files
committed
Removed unused changes from last commit.
1 parent 13e876c commit 3edf6dc

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

Sources/CodeEditTextView/TextView/TextView.swift

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -213,34 +213,6 @@ public class TextView: NSView, NSTextContent {
213213
}
214214
}
215215

216-
/// Whether the text view should use a custom background color
217-
private var useCustomBackground: Bool = false
218-
219-
/// The background color to use when useCustomBackground is true
220-
private var customBackgroundColor: NSColor = .textBackgroundColor {
221-
didSet {
222-
updateBackgroundColor()
223-
}
224-
}
225-
226-
/// Sets the background color of the text view
227-
/// - Parameters:
228-
/// - color: The color to use for the background
229-
/// - useCustom: Whether to use the custom color (true) or system background (false)
230-
public func setBackgroundColor(_ color: NSColor, useCustom: Bool) {
231-
useCustomBackground = useCustom
232-
customBackgroundColor = color
233-
updateBackgroundColor()
234-
}
235-
236-
private func updateBackgroundColor() {
237-
if useCustomBackground {
238-
layer?.backgroundColor = customBackgroundColor.cgColor
239-
} else {
240-
layer?.backgroundColor = NSColor.textBackgroundColor.cgColor
241-
}
242-
}
243-
244216
/// The attributes used to render marked text.
245217
/// Defaults to a single underline.
246218
public var markedTextAttributes: [NSAttributedString.Key: Any] {
@@ -351,7 +323,6 @@ public class TextView: NSView, NSTextContent {
351323

352324
layoutManager.layoutLines()
353325
setUpDragGesture()
354-
layer?.backgroundColor = .clear
355326
}
356327

357328
required init?(coder: NSCoder) {

0 commit comments

Comments
 (0)