Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove insets from scroll view #27

Merged
merged 2 commits into from
May 17, 2024
Merged

Conversation

danielzsh
Copy link
Contributor

@danielzsh danielzsh commented May 3, 2024

Description

Before: see CodeEditApp/CodeEdit#1700
After:

Screen.Recording.2024-05-02.at.10.57.08.PM.mov

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

@danielzsh
Copy link
Contributor Author

Oh shoot, just realized the line numbers are now bleeding over the edge...will see what I can about that 😓

@danielzsh
Copy link
Contributor Author

@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.

@austincondiff
Copy link
Contributor

It looks like the line numbers are fine. The text and selection don't come down far enough though.

@thecoolwinter any thoughts on this?

@danielzsh
Copy link
Contributor Author

By the way, should we potentially hide the horizontal scrollbar if there's nothing to scroll horizontally/if word wrapping is turned on?

thecoolwinter
thecoolwinter previously approved these changes May 10, 2024
@thecoolwinter thecoolwinter dismissed their stale review May 10, 2024 16:32

sorry, misclicked.

@austincondiff
Copy link
Contributor

austincondiff commented May 10, 2024

Oh, I see. The line numbers are overlapping the horizontal scrollbar. Two things need to happen here:

  1. Line numbers / gutter should stop at the horizontal scrollbar if it is displayed.
  2. If there is not horizontal overflow, horizontal scrollbar should be hidden.

@austincondiff austincondiff merged commit 39e5ae3 into CodeEditApp:main May 17, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants