v12.30 b3: Unnecessary horizontal scrollbar

Post bug reports when testing beta versions here.
Post Reply
AndreasW
Posts: 45
Joined: 30 May 2017 07:22

v12.30 b3: Unnecessary horizontal scrollbar

Post by AndreasW » 24 Aug 2017 17:33

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.

AndreasW
Posts: 45
Joined: 30 May 2017 07:22

Re: v12.30 b3: Unnecessary horizontal scrollbar

Post by AndreasW » 01 Sep 2017 20:25

The error still occurs in v12.30. I have recorded a short film showing the error. Please see the attached file.
Attachments
bug.zip
(95.97 KiB) Downloaded 30 times

AndreasW
Posts: 45
Joined: 30 May 2017 07:22

Re: v12.30 b3: Unnecessary horizontal scrollbar

Post by AndreasW » 04 Sep 2017 09:50

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.

User avatar
Rickard Johansson
Site Admin
Posts: 5331
Joined: 19 Jul 2006 14:29

Re: v12.30 b3: Unnecessary horizontal scrollbar

Post by Rickard Johansson » 04 Sep 2017 11:10

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

AndreasW
Posts: 45
Joined: 30 May 2017 07:22

Re: v12.30 b3: Unnecessary horizontal scrollbar

Post by AndreasW » 04 Sep 2017 13:00

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.

User avatar
Rickard Johansson
Site Admin
Posts: 5331
Joined: 19 Jul 2006 14:29

Re: v12.30 b3: Unnecessary horizontal scrollbar

Post by Rickard Johansson » 05 Sep 2017 19:02

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.

AndreasW
Posts: 45
Joined: 30 May 2017 07:22

Re: v12.30 b3: Unnecessary horizontal scrollbar

Post by AndreasW » 05 Sep 2017 20:00

Great! Thank you very much!

Post Reply