Skip to content

Commit 2826711

Browse files
committed
Removed STDecorationView
STDecorationView was removed as it's no longer needed. The view was used for custom rendering attributes, but has been cleaned up to simplify the text view hierarchy.
1 parent 2cb25fe commit 2826711

File tree

2 files changed

+1
-46
lines changed

2 files changed

+1
-46
lines changed

Sources/STTextViewAppKit/Overlays/STDecorationView.swift

-38
This file was deleted.

Sources/STTextViewAppKit/STTextView.swift

+1-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// |---(STLineHighlightView | SelectionHighlightView)
99
// |---contentView
1010
// |---(STInsertionPointView | STTextLayoutFragmentView)
11-
// |---decorationView
1211
// |---gutterView
1312
//
1413
//
@@ -434,9 +433,6 @@ import AVFoundation
434433
/// Selection highlight content view.
435434
internal let selectionView: STSelectionView
436435

437-
/// Layout fragments decoration, custom rendering attributes
438-
internal let decorationView: STDecorationView
439-
440436
internal var fragmentViewMap: NSMapTable<NSTextLayoutFragment, STTextLayoutFragmentView>
441437
private var usageBoundsForTextContainerObserver: NSKeyValueObservation?
442438

@@ -586,7 +582,6 @@ import AVFoundation
586582

587583
contentView = STContentView()
588584
selectionView = STSelectionView()
589-
decorationView = STDecorationView(textLayoutManager: textLayoutManager)
590585

591586
allowsUndo = true
592587
_undoManager = CoalescingUndoManager()
@@ -625,7 +620,6 @@ import AVFoundation
625620

626621
addSubview(selectionView)
627622
addSubview(contentView)
628-
addSubview(decorationView)
629623

630624
do {
631625
let recognizer = DragSelectedTextGestureRecognizer(target: self, action: #selector(_dragSelectedTextGestureRecognizer(gestureRecognizer:)))
@@ -760,7 +754,7 @@ import AVFoundation
760754
// and ignore utility subviews that should remain transparent
761755
// for interaction.
762756
if let view = result, view != self,
763-
(view.isDescendant(of: contentView) || view.isDescendant(of: selectionView) || view.isDescendant(of: decorationView))
757+
(view.isDescendant(of: contentView) || view.isDescendant(of: selectionView))
764758
{
765759
return self
766760
}
@@ -1211,7 +1205,6 @@ import AVFoundation
12111205
if !contentFrame.isAlmostEqual(to: contentView.frame) {
12121206
contentView.frame = contentFrame
12131207
selectionView.frame = contentFrame
1214-
decorationView.frame = contentFrame
12151208
}
12161209

12171210
_configureTextContainerSize()

0 commit comments

Comments
 (0)