Page 1 of 1

v12.30 b3: Unnecessary horizontal scrollbar

Posted: 24 Aug 2017 17:33
by AndreasW
When you type text in a line so that the line gets longer and longer, a horizontal scrollbar will appear suddenly, although no horizontal scrollbar is necessary. From my understanding, a horizontal scrollbar should only appear if the length of the line exceeds the width of the editor window.

This problem occurs regardless of whether the option "Auto hide horizontal scroll bar" is activated or not. Actually this option seems to have no effect at all.

Re: v12.30 b3: Unnecessary horizontal scrollbar

Posted: 01 Sep 2017 20:25
by AndreasW
The error still occurs in v12.30. I have recorded a short film showing the error. Please see the attached file.

Re: v12.30 b3: Unnecessary horizontal scrollbar

Posted: 04 Sep 2017 09:50
by AndreasW
The error is still present in 12.31. It's quite annoying. Don't you want to fix it? Do you need any more information from my side to reproduce it?

By the way, you can forget my comment about the "Auto hide" option. I understand now what this option does.

Re: v12.30 b3: Unnecessary horizontal scrollbar

Posted: 04 Sep 2017 11:10
by Rickard Johansson
It's an issue that's been discussed a few times and I've never found an easy solution.

I can make it work better when using a fixed width font. Measuring the line length is then a simple math problem were you can easily calculate the max number of characters allowed on each line before the horizontal scroll bar needs to be visible.

But with proportional fonts it's not so simple. Measuring the line length is slow and constantly doing so really slows down the program. We would also have to measure every line when opening the file which would take forever with a large file.

The simplest and most konsistent solution would be to just have the horizontal scroll bar visible at all times...

Re: v12.30 b3: Unnecessary horizontal scrollbar

Posted: 04 Sep 2017 13:00
by AndreasW
Rickard Johansson wrote: 04 Sep 2017 11:10 I can make it work better when using a fixed width font.
I would be fully satisfied with that. But in order to keep the users of proportional fonts satisfied too, how about the following proposal? Determine whether a fixed width font is in use. If so, then apply the "simple math" solution. Otherwise, keep the horizontal scroll bar visible at all times.

Re: v12.30 b3: Unnecessary horizontal scrollbar

Posted: 05 Sep 2017 19:02
by Rickard Johansson
After some testing I did find a solution. Drawn lines can always be measured. So the horizontal scroll bar can be displayed and resized as desired based on the length of the displayed lines.
  1. So if no lines in your text exceed the right edge, no scroll bar is ever displayed.
  2. If a line longer than the display is encountered either by typing or scrolling vertically - the horizontal scroll bar becomes visible and resized.
  3. If an even longer line is encountered further down while scrolling - the horizontal scroll bar is resized and positioned accordingly.

Re: v12.30 b3: Unnecessary horizontal scrollbar

Posted: 05 Sep 2017 20:00
by AndreasW
Great! Thank you very much!