Remove insets from scroll view
Description
Before: see https://github.com/CodeEditApp/CodeEdit/issues/1700 After:
https://github.com/CodeEditApp/CodeEditTextView/assets/65467530/a6ce46fa-6576-4c23-8e72-0af64861d168
Related Issues
- Closes https://github.com/CodeEditApp/CodeEdit/issues/1700
- Closes #7
Checklist
- [x] I read and understood the contributing guide as well as the code of conduct
- [x] The issues this PR addresses are related to each other
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] My changes are all related to the related issue above
- [x] I documented my code
Screenshots
Oh shoot, just realized the line numbers are now bleeding over the edge...will see what I can about that 😓
@austincondiff sorry I'm really new to Swift and am probably missing a really easy way to fix this issue; any pointers? I think the issue stems from the fact that gutterView is added via addFloatingSubview, which causes it to display over the horizontal scrollbar, but I can't figure out how to get it to display under.
It looks like the line numbers are fine. The text and selection don't come down far enough though.
@thecoolwinter any thoughts on this?
By the way, should we potentially hide the horizontal scrollbar if there's nothing to scroll horizontally/if word wrapping is turned on?
Oh, I see. The line numbers are overlapping the horizontal scrollbar. Two things need to happen here:
- Line numbers / gutter should stop at the horizontal scrollbar if it is displayed.
- If there is not horizontal overflow, horizontal scrollbar should be hidden.