From 33b8203fb15f55c9611f743d97364cf9a9aae6f3 Mon Sep 17 00:00:00 2001 From: Jannis Weis <31143295+weisJ@users.noreply.github.com> Date: Tue, 28 Dec 2021 12:50:41 +0100 Subject: [PATCH] ScrollBar: Make minimum width/height of scrollbar twice as large as smaller axis. This makes it easier to grab the scrollbar for large viewports. --- .../github/weisj/darklaf/ui/scrollpane/DarkScrollBarUI.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkScrollBarUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkScrollBarUI.java index 9bf9a482..1aad067f 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkScrollBarUI.java +++ b/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