Community
Participate
Working Groups
Go to General -> Appearance -> Colors and Fonts -> Basic -> Text Font and change to something different than the default. Apply. After some (indeterminate) time, the mouse scroll in editor windows changes from the OS default (3, in my case) to 1 line at a time. Go back to the same settings page and change the font to a different size. Apply. Scrolling is once again (for some short period of time) back to 3 lines at a time but it will not last. This is easily worked around but HUGELY annoying because it happens so often. BTW, large screen at high rez (3440x1440) and old eyes :) I *do* need to push the font size up. -- Configuration Details -- Product: Eclipse IDE 4.16.0.20200615-1200 (org.eclipse.epp.package.php.product)Installed Features: org.eclipse.platform 4.16.0.v20200604-0951
Created attachment 283601 [details] Font change dialog and location within the UI
This is probably an issue in SWT or it is an issue with the specific editor you are using. Do you observe this behavior in all editors? In which editors do you observe this behavior? I assume that your OS default is not affected, is that correct (just to be sure). At least moving to the Text component, as that is more related.
I'm not sure what editor, at least in terms that the Eclipse team uses :) I'm using the PDT for PHP development predominately and I'll update if I notice this in anything other than editing files of that type. The OS scrolling is not impacted, no, just in eclipse. Thanks for the component adjustment; it's hard to determine the right one.
Very odd behavior. I restart Eclipse and scrolling is all reset to roughly one-line (see two attached images showing it scrolling about 1.25 lines per wheel tick) on all file editors (I have almost exclusively PHP files open). I clicked into three files and tested scrolling on each, then changed the Text Font to "fix" the problem. The three editors I clicked into all scroll by exactly 3 lines, as they should, but all other open editors that I did NOT click into remain with the 1.25 lines per scrolling. Opening a new file has that file scrolling at 3 lines per tick. I've attached two images showing the 1.25 line scrolling. First shows the top part of an editor window view with two lines of code, the second shows that area after a single tick down on the scroll wheel.
Created attachment 283658 [details] Top of editor window before scrolling
Created attachment 283659 [details] Top of editor window after single scroll
I can confirm that I see the same behavior in the Java editor. Never noticed this before, even though I use a slightly bigger font too. After restarting Eclipse it seems that the default font size is used for determining the scroll height. This might be an Windows SWT issue. Can somebody try to reproduce this on Mac or Linux?
The problem arises from org.eclipse.swt.custom.StyledText.handleVerticalScroll(Event) It calculates the number of pixels to scroll, based on the scrollbar and the scrolloffset. Both of these values are to low, when changing the font these values become correct and the scrolling is correct. I was not able to find the root cause why the two values are too low.
Could UI scaling be a factor?
(In reply to Nitin Dahyabhai from comment #9) > Could UI scaling be a factor? I have been testing on a monitor without scaling, and the difference in pixels seems to be correlated to the font size. Therefore, I don't think UI scaling is a factor.
Upon further investigation, the increment of the vertical bar is incorrect. It is correctly set during initialization, but the value is changed afterwards by the RulerLayout. In org.eclipse.jface.text.source.SourceViewer.RulerLayout.getVerticalScrollArrowHeights(StyledText, int) line 222, the increment is reset to 10. Commenting out this line fixes the problem.
(In reply to Rolf Theunissen from comment #11) > Upon further investigation, the increment of the vertical bar is incorrect. > It is correctly set during initialization, but the value is changed > afterwards by the RulerLayout. > > In > org.eclipse.jface.text.source.SourceViewer.RulerLayout. > getVerticalScrollArrowHeights(StyledText, int) line 222, the increment is > reset to 10. > Commenting out this line fixes the problem. I assume there is nothing I can do as a user except wait and hope this makes it in to a release?
*** Bug 569031 has been marked as a duplicate of this bug. ***
As reported in the duplicate issue, occurs also in 4.17.