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

Last editor line partly hidden #103

Open
PyvesB opened this issue Aug 2, 2020 · 2 comments
Open

Last editor line partly hidden #103

PyvesB opened this issue Aug 2, 2020 · 2 comments

Comments

@PyvesB
Copy link
Contributor

PyvesB commented Aug 2, 2020

Unfortunately, my fix from #95 introduced an annoying side effect: the last line of an editor is partly hidden even when scrolling right to the very bottom. See the following screenshot:
partly-hidden-last-line

It's not the end of the world as the last line is generally empty or contains a single bracket, but it's still something I'm keen on getting fixed.

After quickly digging through the code, I believe the following line is at fault:

int horizontalBarHeight = context.getScrollable().getHorizontalBarSize().y;

If the flat scrollbar is visible (i.e. context.isHorizontalBarVisible() true), padding is applied. However, the padding includes the height of the native horizontal scroll bar even if it's not visible (i.e. context.getScrollable().getHorizontalBarVisible() would return false).

The code should be made more clever to cover three cases:

  • no flat scrollbar nor native one -> no padding
  • flat scrollbar but no native one -> reduced padding
  • flat scrollbar and native one -> full padding

I will be submitting a pull request shortly.

@fappel
Copy link
Owner

fappel commented Aug 8, 2020

Thanks for reporting and fixing this issue! I've merged it into the development branch and building it seems to work fine. I will work on a new release version ASAP. Unfortunately - or fortunately depending on the point of view -, I'm very busy at the moment, so this might take a while. Hope this will not cause any blocker on your side. Greetings and thanks again!

@PyvesB
Copy link
Contributor Author

PyvesB commented Aug 8, 2020

Thanks for merging!

I'm very busy at the moment, so this might take a while. Hope this will not cause any blocker on your side

None at all! I've decided to republish a separate update site for my own themes, that gives me more flexibility when experimenting with fixes before turning them into more polished pull requests, and it also means there's less pressure on your side to get things released quickly :)

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

No branches or pull requests

2 participants