Browse Source

Fix fast scrolling when mouse is over scrollbar of OverlayScrollPane.

pull/187/head
weisj 4 years ago
parent
commit
c98b7a4f12
  1. 4
      core/src/main/java/com/github/weisj/darklaf/components/OverlayScrollPane.java

4
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) { protected void setupScrollPane(final JScrollPane scrollPane) {
JScrollBar verticalScrollBar = createScrollBar(JScrollBar.VERTICAL); 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); JScrollBar horizontalScrollBar = createScrollBar(JScrollBar.HORIZONTAL);
horizontalScrollBar.putClientProperty(ScrollBarConstants.KEY_SCROLL_PANE_PARENT, this); horizontalScrollBar.putClientProperty(ScrollBarConstants.KEY_SCROLL_PANE_PARENT, scrollPane);
scrollPane.addPropertyChangeListener(this); scrollPane.addPropertyChangeListener(this);
updateScrollPaneUI(); updateScrollPaneUI();
scrollPane.setVerticalScrollBar(verticalScrollBar); scrollPane.setVerticalScrollBar(verticalScrollBar);

Loading…
Cancel
Save