From 1c3c64019ecd617bcc67d3165d057cdc68bb1164 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Thu, 15 Oct 2015 17:10:09 +0200 Subject: [PATCH] Mac laf: fix Project View top border (cherry picked from commit 5ad0b4f8e2356ac379e375ccd012f92e3753a28f) --- .../util/src/com/intellij/util/ui/UIUtil.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/platform/util/src/com/intellij/util/ui/UIUtil.java b/platform/util/src/com/intellij/util/ui/UIUtil.java index b99461eb76b0..5483cf3026e4 100644 --- a/platform/util/src/com/intellij/util/ui/UIUtil.java +++ b/platform/util/src/com/intellij/util/ui/UIUtil.java @@ -1639,11 +1639,24 @@ public class UIUtil { g.fillRect(x, 0, width, height); } g.setColor(new Color(0, 0, 0, toolWindow ? 90 : 50)); - if (drawTopLine) g.drawLine(x, 0, width, 0); + if (drawTopLine && !(SystemInfo.isMac && isUnderIntelliJLaF())) g.drawLine(x, 0, width, 0); if (drawBottomLine) g.drawLine(x, height - (isRetina() ? 1 : 2), width, height - (isRetina() ? 1 : 2)); - g.setColor(isUnderDarcula() ? Gray._255.withAlpha(30) : new Color(255, 255, 255, 100)); - g.drawLine(x, drawTopLine ? 1 : 0, width, drawTopLine ? 1 : 0); + if (SystemInfo.isMac && isUnderIntelliJLaF()) { + g.setColor(Gray.xC9); + } else { + g.setColor(isUnderDarcula() ? Gray._255.withAlpha(30) : new Color(255, 255, 255, 100)); + } + if (isRetina()) { + Graphics2D g2 = (Graphics2D)g.create(0, 0, width, height); + g2.scale(0.5, 0.5); + + g2.drawLine(2*x, 0, 2 * width, 0); + g2.scale(1, 1); + g2.dispose(); + } else { + g.drawLine(x, drawTopLine ? 1 : 0, width, drawTopLine ? 1 : 0); + } } finally { config.restore();