Skip to content

Commit

Permalink
TextComponents: fixed too fast scrolling in multi-line text component…
Browse files Browse the repository at this point in the history
…s when using touchpads (e.g. on macOS) (issue #892)
  • Loading branch information
DevCharly committed Oct 11, 2024
1 parent 3391f97 commit b304d46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit b304d46

Please sign in to comment.