Browse Source

ScrollBar: Make minimum width/height of scrollbar twice as large as smaller axis.

This makes it easier to grab the scrollbar for large viewports.
spotless
Jannis Weis 3 years ago
parent
commit
33b8203fb1
No known key found for this signature in database
GPG Key ID: 7C9D8D4B558049AB
  1. 6
      core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkScrollBarUI.java

6
core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkScrollBarUI.java

@ -212,7 +212,11 @@ public class DarkScrollBarUI extends BasicScrollBarUI implements ScrollBarConsta
@Override
protected Dimension getMinimumThumbSize() {
int size = getThickness();
return new Dimension(size, size);
if (scrollbar.getOrientation() == JScrollBar.HORIZONTAL) {
return new Dimension(2 * size, size);
} else {
return new Dimension(size, 2 * size);
}
}
@Override

Loading…
Cancel
Save