From c98b7a4f12f2b22319e4c9f84439e0d6687bc909 Mon Sep 17 00:00:00 2001 From: weisj Date: Sat, 27 Jun 2020 23:19:52 +0200 Subject: [PATCH] Fix fast scrolling when mouse is over scrollbar of OverlayScrollPane. --- .../github/weisj/darklaf/components/OverlayScrollPane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/github/weisj/darklaf/components/OverlayScrollPane.java b/core/src/main/java/com/github/weisj/darklaf/components/OverlayScrollPane.java index 8045025a..1f130b27 100644 --- a/core/src/main/java/com/github/weisj/darklaf/components/OverlayScrollPane.java +++ b/core/src/main/java/com/github/weisj/darklaf/components/OverlayScrollPane.java @@ -112,9 +112,9 @@ public class OverlayScrollPane extends JLayeredPane implements PropertyChangeLis protected void setupScrollPane(final JScrollPane scrollPane) { JScrollBar verticalScrollBar = createScrollBar(JScrollBar.VERTICAL); - verticalScrollBar.putClientProperty(ScrollBarConstants.KEY_SCROLL_PANE_PARENT, this); + verticalScrollBar.putClientProperty(ScrollBarConstants.KEY_SCROLL_PANE_PARENT, scrollPane); JScrollBar horizontalScrollBar = createScrollBar(JScrollBar.HORIZONTAL); - horizontalScrollBar.putClientProperty(ScrollBarConstants.KEY_SCROLL_PANE_PARENT, this); + horizontalScrollBar.putClientProperty(ScrollBarConstants.KEY_SCROLL_PANE_PARENT, scrollPane); scrollPane.addPropertyChangeListener(this); updateScrollPaneUI(); scrollPane.setVerticalScrollBar(verticalScrollBar);