Bug #10602
Fix scrolling in browse on Swing after switching to accumulated scrolling
100%
History
#1 Updated by Șerban Bursuc 10 months ago
From #9986 we discovered smooth scrolling, a feature available for certain mice hardware that can be enabled through software. The scroll amounts vary significantly from normal scrolling, and thus for #9986 we used a different approach to make smooth scrolling... smoother in FWD. However, Swing produces vastly different scroll amounts compared to JavaScript in the scroll events, which means the used formula isn't quite working as well for Swing.
The goal is to fix this regression and make scrolling be much much easier for Swing again.
#3 Updated by Șerban Bursuc 10 months ago
- reviewer Stanislav Lomany added
Swing gives the same scroll amounts for both smooth and non smooth scrolling unlike JavaScript, which makes the accumulated scroll formula inadequate.
Unless FWD can access the API of the mouse to explicitly check for smooth scrolling I am willing to disable the accumulated scroll idea for Swing entirely. This will mean that it will be easy to scroll dozens of rows if not careful, but it will allow the vast majority of normal scroll users to scroll normally again.
I disabled accumulated scrolling in 10602a. Please review.
#4 Updated by Șerban Bursuc 10 months ago
- Status changed from WIP to Review
#5 Updated by Stanislav Lomany 10 months ago
I'm OK with the update, but please hide the calculations unnecessary for the Swing case under appropriate condition:
double scrollAmount = Math.abs(e.getScrollAmount()) / 100.0; accumulatedScrollAmount += scrollAmount;
#6 Updated by Șerban Bursuc 10 months ago
Stanislav Lomany wrote:
I'm OK with the update, but please hide the calculations unnecessary for the Swing case under appropriate condition:
[...]
Fair point. Fixed it in rev. 16185.
#7 Updated by Stanislav Lomany 10 months ago
10602a rev 16185.
The update is good.
#8 Updated by Șerban Bursuc 10 months ago
- Status changed from Review to Internal Test
#9 Updated by Alexandru Lungu 10 months ago
Serban, is it ready to be merged?
#10 Updated by Șerban Bursuc 10 months ago
Alexandru Lungu wrote:
Serban, is it ready to be merged?
It is now.
For clarity: somehow a set of changes slipped from 9498d and from 10408a. I added it again to fix the cursor changing when clicking a text widget. Will triple check when rebasing that the change is still there.
Awaiting merge pending.
#11 Updated by Alexandru Lungu 10 months ago
- Status changed from Internal Test to Merge Pending
- % Done changed from 0 to 100
Please merge to trunk now.
#12 Updated by Șerban Bursuc 10 months ago
- Status changed from Merge Pending to Test
10602a has been merged into trunk with rev. 16186 and archived.