From eac1f4d2de605ff0c3373121ec4c548f99a09cf1 Mon Sep 17 00:00:00 2001 From: Alexey Pegov Date: Tue, 22 Mar 2011 14:22:19 +0300 Subject: [PATCH] [mac] editortextfield border -> nonopaque for some cases --- platform/util/src/com/intellij/util/ui/MacUIUtil.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/util/src/com/intellij/util/ui/MacUIUtil.java b/platform/util/src/com/intellij/util/ui/MacUIUtil.java index 458da7cd41ff..cfc2195c8c3c 100644 --- a/platform/util/src/com/intellij/util/ui/MacUIUtil.java +++ b/platform/util/src/com/intellij/util/ui/MacUIUtil.java @@ -32,6 +32,7 @@ import java.lang.reflect.Field; public class MacUIUtil { public static final boolean USE_QUARTZ = "true".equals(System.getProperty("apple.awt.graphics.UseQuartz")); + public static final String MAC_FILL_BORDER = "MAC_FILL_BORDER"; private MacUIUtil() { } @@ -50,8 +51,10 @@ public class MacUIUtil { final int width1 = width - 8; final int height1 = height - 6; - g.setColor(UIUtil.getPanelBackground()); - g.fillRect(x, y, width, height); + if (c.isOpaque() || (c instanceof JComponent && ((JComponent)c).getClientProperty(MAC_FILL_BORDER) == Boolean.TRUE)) { + g.setColor(UIUtil.getPanelBackground()); + g.fillRect(x, y, width, height); + } g.setColor(c.getBackground()); g.fillRect(x1, y1, width1, height1);