CodeEditTextView icon indicating copy to clipboard operation
CodeEditTextView copied to clipboard

Remove insets from scroll view

Open xyzqm opened this issue 1 year ago • 2 comments

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

xyzqm avatar May 03 '24 05:05 xyzqm

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

xyzqm avatar May 05 '24 06:05 xyzqm

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

xyzqm avatar May 06 '24 06:05 xyzqm

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

@thecoolwinter any thoughts on this?

austincondiff avatar May 06 '24 12:05 austincondiff

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

xyzqm avatar May 06 '24 14:05 xyzqm

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 avatar May 10 '24 16:05 austincondiff