diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b3c9cb75..45facd83e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ FlatLaf Change Log using custom component that overrides `Component.contains(int x, int y)` and invokes `SwingUtilities.convertPoint()` (or similar) from the overridden method. (issue #878) +- TextComponents: Fixed too fast scrolling in multi-line text components when + using touchpads (e.g. on macOS). (issue #892) - ToolBar: Fixed endless loop if button in Toolbar has focus and is made invisible. (issue #884) diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollPaneUI.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollPaneUI.java index d851b23b3..142f222ed 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollPaneUI.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatScrollPaneUI.java @@ -210,7 +210,7 @@ private void mouseWheelMovedSmooth( MouseWheelEvent e ) { // Use (0, 0) view position to obtain a constant unit increment of first item. // Unit increment may be different for each item. - Rectangle visibleRect = new Rectangle( viewport.getViewSize() ); + Rectangle visibleRect = new Rectangle( viewport.getExtentSize() ); unitIncrement = scrollable.getScrollableUnitIncrement( visibleRect, orientation, 1 ); if( unitIncrement > 0 ) {