Browse Source

ScrollBar: Hide rounded scrollbar if thumb is empty.

If a theme decides to make the minimized scrollbar be size
0 it should be completely hidden.
spotless
Jannis Weis 3 years ago
parent
commit
7cf80c29d1
No known key found for this signature in database
GPG Key ID: 7C9D8D4B558049AB
  1. 2
      core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkRoundedScrollBarUI.java

2
core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkRoundedScrollBarUI.java

@ -73,10 +73,12 @@ public abstract class DarkRoundedScrollBarUI extends DarkScrollBarUI {
}
int arc = horizontal ? height : width;
roundRect.setRoundRect(x, y, width, height, arc, arc);
if (!roundRect.isEmpty()) {
g.setColor(getThumbColor());
g.fill(roundRect);
g.setColor(getThumbBorderColor());
g.draw(roundRect);
}
context.restore();
}

Loading…
Cancel
Save