Browse Source

Fixed border is painted shifted.

Signed-off-by: weisj <weisj@arcor.de>
pull/33/head
weisj 5 years ago
parent
commit
9e7388f343
  1. 4
      src/main/java/com/github/weisj/darklaf/util/DarkUIUtil.java

4
src/main/java/com/github/weisj/darklaf/util/DarkUIUtil.java

@ -118,7 +118,9 @@ public final class DarkUIUtil {
public static void paintLineBorder(final Graphics2D g, final float x, final float y,
final float width, final float height, final int arc) {
GraphicsContext config = GraphicsUtil.setupStrokePainting(g);
g.draw(new RoundRectangle2D.Float(x, y, width, height, arc, arc));
Stroke stroke = g.getStroke();
float lw = stroke instanceof BasicStroke ? ((BasicStroke) stroke).getLineWidth() : 1;
g.draw(new RoundRectangle2D.Float(x - lw, y - lw, width + lw, height + lw, arc, arc));
config.restore();
}

Loading…
Cancel
Save