Closed pintassilgo closed 2 months ago
improved it now. it is not ideal correct pos, but now it shows 100% when scrolled to end. I have limitation: max int for OS scrollbar lazarus API is MaxShort (16bit), so for big files result is not ok.
thumb size is not fixed yet.
beta cudatext.xz.zip
Thanks, but this new version seems worse.
Now it's simply impossible for the thumb to be at the top. Look, I'm at the top of the document:
There should be no gap above thumb, since first visible line is 1st line of the file.
This happens the same in giant files, for which there was no such issue. The only issue for big file still remain: when I scroll to the bottom of the file, status still shows 99%, not 100%.
In summary: new version fixed status percentage for small file, but for the other cases or issues it's now worse or still not fixed.
reverted v-scrollbar pos. (percent display is kept).
thumb size cannot be fixed IN TEXT (+UNICODE) mode. because in these modes, 'page size' depends on scroll pos, it is number of chars on visible area, it changes on scroll. but can we change thumb size on scroll? no. it is bad UI.
viewer don't have 'number of visible lines' + 'total lines' calculation (for small files: yes, for big: no).
viewer don't have 'number of visible lines' + 'total lines' calculation (for small files: yes, for big: no).
Well, for big files thumb size can be the minimum as it already is. For big file, big scrollable area, small thumb, it's correct. If you think you can fix thumb size for small files, it would probably fix everything related to thumb size.
I don't have idea how to calculate (easily) the 'total lines' and 'current visible lines', so no, cannot fix it. let's decline this fix.
OK, thumb size is not important. But thumb position I believe it is. Do you think it's fixable? If I'm seeing first line, thumb should be touching the top limit of scrollbar. If I'm seeing last line, thumb should be touching the bottom limit of scrollbar.
And it would be good if status can display 100% if I can't scroll down i.e. last line is visible.
If I'm seeing first line, thumb should be touching the top limit of scrollbar.
now it works.
If I'm seeing last line, thumb should be touching the bottom limit of scrollbar.
this will be auto OK if I fix the 'page size of scrollbar' but I won't change it - 'page size' means 'count of chars in visible area' so pagesize will change on scrolling - bad ui. so won't fix.
Thanks.
What if you make thumb position to follow status percentage? With the single exception of when first line is visible.
So if percentage is 50%, thumb will be at the center of scrollbar. If percentage is 100%, thumb will be at the bottom.
I guess this would be a better UI compared to current (look at the first image of this issue, thumb is near the top but I can't scroll down, last line is visible).
Edit: with last beta, now status shows 100% when I see the last line of the giant file, which is correct. Thanks. So I just stand with my suggestion above and I think we're done.
this will lead to:
Yes, what you described is caused by the first reported issue here, the bad size of the thumb, hard to fix as you said.
I think this needing to do big drag to scroll in small file with only a couple of scrollable lines is better than current incomprehensible case of thumb being at the top with giant gap below it while document is already fully scrolled, with last line visible.
Needing to drag to the bottom of scrollbar to see last lines of the document at least makes sense for everyone. The giant gap below the thumb when there's nothing more to scroll down, doesn't.
But if you're sure of your decision, I think you can close this one as wontfix.
i don't like the idea - show thumb on top for scroll=0, and show thumb for bottom-pos for scroll != 0. it makes thumb jump on scroll, as i said.
it also makes code heavier.
At least on KDE Plasma (or Cuda Qt5).
If you open a file whose content has scrollable content, scrollbar thumb is displayed in its minimal size, what should only happen when document is long.
Using the same small, but scrollable file in Viewer, scrolling all the way down should have scrollbar thumb at the bottom, but this doesn't happen. Example:
The percentage in status is also wrong. It means the relative position of current view in the whole document, right? It should display 100% in the screenshot, not 6%, because there's no way to scroll down more.
Just for comparison, this is the proper scrollbar thumb and position when I open the same file in normal editor: