Skip to content

Add contentInsets Parameter - #141

Merged
thecoolwinter merged 5 commits into
CodeEditApp:mainfrom
thecoolwinter:content-insets
Feb 15, 2023
Merged

thecoolwinter merged 5 commits into
CodeEditApp:mainfrom
thecoolwinter:content-insets

Conversation

@thecoolwinter

Copy link
Copy Markdown
Collaborator

Description

This PR adds a contentInsets parameter that lets users set an inset object for the editor. It also updates STTextView to be able to set the left inset correctly. When left nil the scroll view will use automatic insets.

This also doesn't override the overscroll option, but rather adds the overscroll after the insets are applied.

Related Issues

Screenshots

Adding top and left insets:
Screenshot 2023-02-14 at 3 09 57 PM

Adding left and bottom insets (scroller is also inset):
Screenshot 2023-02-14 at 3 10 15 PM

austincondiff
austincondiff previously approved these changes Feb 14, 2023

@austincondiff austincondiff left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Wouter01
Wouter01 previously approved these changes Feb 14, 2023
@Wouter01

Copy link
Copy Markdown
Member

I'll give it a go tomorrow, but looks good!

@thecoolwinter

thecoolwinter commented Feb 14, 2023 •

Copy link
Copy Markdown
Collaborator Author

Ah shoot, don't merge it looks like a test is still failing. I'll fix it in a bit.

Ready to review, just added some tests and fixed to pass the failing ones.

@thecoolwinter
thecoolwinter dismissed stale reviews from Wouter01 and austincondiff via dbc93c3 February 15, 2023 01:59
@thecoolwinter
thecoolwinter merged commit d83b449 into CodeEditApp:main Feb 15, 2023
@thecoolwinter
thecoolwinter deleted the content-insets branch July 12, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants