Skip to content

Commit

Permalink
add trailing padding
Browse files Browse the repository at this point in the history
  • Loading branch information
krzyzanowskim committed Jan 9, 2025
1 parent 9b25347 commit 57a462a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/STTextViewAppKit/STTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ import AVFoundation
if isHorizontallyResizable {
// no-wrapping
frameSize = CGSize(
width: max(usageBoundsForTextContainer.size.width + gutterWidth, visibleRect.width),
width: max(usageBoundsForTextContainer.size.width + gutterWidth + textContainer.lineFragmentPadding, visibleRect.width),
height: max(usageBoundsForTextContainer.size.height, visibleRect.height - verticalScrollInset)
)
} else {
Expand Down
2 changes: 1 addition & 1 deletion Sources/STTextViewUIKit/STTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ import STTextViewCommon
open override func sizeToFit() {
let gutterWidth = gutterView?.frame.width ?? 0
contentView.frame.origin.x = gutterWidth
contentView.frame.size.width = max(textLayoutManager.usageBoundsForTextContainer.size.width, frame.width - gutterWidth)
contentView.frame.size.width = max(textLayoutManager.usageBoundsForTextContainer.size.width + textContainer.lineFragmentPadding, frame.width - gutterWidth)
contentView.frame.size.height = max(textLayoutManager.usageBoundsForTextContainer.size.height, frame.height)
contentSize = contentView.frame.size

Expand Down

0 comments on commit 57a462a

Please sign in to comment.