From 754ff3f93a50a09494b8464b0d8ab747c2d3651f Mon Sep 17 00:00:00 2001 From: weisj Date: Mon, 17 Feb 2020 01:16:50 +0100 Subject: [PATCH] Fixed fill painting. And resulting problems with TaskPane. Signed-off-by: weisj --- .../weisj/darklaf/ui/taskpane/DarkTaskPaneUI.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/taskpane/DarkTaskPaneUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/taskpane/DarkTaskPaneUI.java index f7099061..2eb8d1e1 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/taskpane/DarkTaskPaneUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/taskpane/DarkTaskPaneUI.java @@ -111,11 +111,11 @@ public class DarkTaskPaneUI extends MetalTaskPaneUI { if (c.isOpaque()) { g.setColor(c.getBackground()); g.setClip(clip.x, clip.x + h - arc, width, arc); - DarkUIUtil.fillRoundRect((Graphics2D) g, x, y, width - 1, h - 1, arc); + DarkUIUtil.fillRoundRect((Graphics2D) g, x - 1, y, width - 2, h - 1, arc); } g.setClip(clip.x, clip.y + h / 2 - 1, width, h / 2 + 2); g.setColor(color); - DarkUIUtil.paintLineBorder((Graphics2D) g, x, y, width - 1, h - 1, arc); + DarkUIUtil.paintLineBorder((Graphics2D) g, x + 1, y, width - 2, h - 1, arc); g.setClip(clip); } @@ -141,19 +141,19 @@ public class DarkTaskPaneUI extends MetalTaskPaneUI { g.setColor(titleBackgroundGradientStart); } if (isCollapsed()) { - DarkUIUtil.fillRoundRect(g, 0, 0, w - 1, h - 1, getRoundHeight()); + DarkUIUtil.fillRoundRect(g, 1, 1, w - 2, h - 2, getRoundHeight()); g.setColor(borderColor); - DarkUIUtil.paintLineBorder(g, 0, 0, w - 1, h - 1, getRoundHeight()); + DarkUIUtil.paintLineBorder(g, 1, 1, w - 2, h - 2, getRoundHeight()); } else { Rectangle clip = g.getClip().getBounds(); g.setClip(0, 0, w, h / 2 + 1); - DarkUIUtil.fillRoundRect(g, 0, 0, w - 1, h - 1, getRoundHeight()); + DarkUIUtil.fillRoundRect(g, 1, 1, w - 2, h - 2, getRoundHeight()); g.setClip(0, h / 2 - 1, w, h / 2 + 2); g.fillRect(0, 0, w, h); g.setColor(borderColor); g.setClip(0, 0, w, h / 2 + 1); - DarkUIUtil.paintLineBorder(g, 0, 0, w - 1, h - 1, getRoundHeight()); + DarkUIUtil.paintLineBorder(g, 1, 1, w - 2, h - 2, getRoundHeight()); g.setClip(0, h / 2 - 1, w, h / 2 + 2); DarkUIUtil.drawRect(g, 0, 0, w, h, 1); g.setClip(clip);