diff options
Diffstat (limited to 'platform/platform-api/src/com/intellij/openapi/ui/DetailsComponent.java')
-rw-r--r-- | platform/platform-api/src/com/intellij/openapi/ui/DetailsComponent.java | 88 |
1 files changed, 48 insertions, 40 deletions
diff --git a/platform/platform-api/src/com/intellij/openapi/ui/DetailsComponent.java b/platform/platform-api/src/com/intellij/openapi/ui/DetailsComponent.java index 463d950ae900..00440b0dd8a6 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/DetailsComponent.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/DetailsComponent.java @@ -17,6 +17,7 @@ package com.intellij.openapi.ui; import com.intellij.openapi.project.Project; +import com.intellij.openapi.util.registry.Registry; import com.intellij.ui.components.panels.NonOpaquePanel; import com.intellij.ui.components.panels.Wrapper; import com.intellij.util.ArrayUtil; @@ -65,47 +66,54 @@ public class DetailsComponent { protected void paintComponent(final Graphics g) { if (NullableComponent.Check.isNull(myContent) || !myDetailsEnabled) return; - GraphicsConfig c = new GraphicsConfig(g); - c.setAntialiasing(true); - - Insets insets = getInsets(); - if (insets == null) { - insets = new Insets(0, 0, 0, 0); + GraphicsConfig c = null; + Insets insets = null; + final int leftX; + final int rightX; + final int rightY; + if (!Registry.is("ide.new.settings.dialog")) { + c = new GraphicsConfig(g); + c.setAntialiasing(true); + + insets = getInsets(); + if (insets == null) { + insets = new Insets(0, 0, 0, 0); + } + + g.setColor(UIUtil.getFocusedFillColor()); + + final Rectangle banner = myBanner.getBounds(); + final GeneralPath header = new GeneralPath(); + + leftX = insets.left; + final int leftY = insets.top; + rightX = insets.left + getWidth() - 1 - insets.right; + rightY = banner.y + banner.height; + + header.moveTo(leftX, rightY); + int arc = 8; + header.lineTo(leftX, leftY + arc); + header.quadTo(leftX, leftY, leftX + arc, leftY); + header.lineTo(rightX - arc, leftY); + header.quadTo(rightX, leftY, rightX, leftY + arc); + header.lineTo(rightX, rightY); + header.closePath(); + + c.getG().fill(header); + + g.setColor(UIUtil.getFocusedBoundsColor()); + + c.getG().draw(header); + + + if (myPaintBorder) { + final int down = getHeight() - insets.top - insets.bottom - 1; + g.drawLine(leftX, rightY, leftX, down); + g.drawLine(rightX, rightY, rightX, down); + g.drawLine(leftX, down, rightX, down); + } + c.restore(); } - - g.setColor(UIUtil.getFocusedFillColor()); - - final Rectangle banner = myBanner.getBounds(); - final GeneralPath header = new GeneralPath(); - - final int leftX = insets.left; - final int leftY = insets.top; - final int rightX = insets.left + getWidth() - 1 - insets.right; - final int rightY = banner.y + banner.height; - - header.moveTo(leftX, rightY); - int arc = 8; - header.lineTo(leftX, leftY + arc); - header.quadTo(leftX, leftY, leftX + arc, leftY); - header.lineTo(rightX - arc, leftY); - header.quadTo(rightX, leftY, rightX, leftY + arc); - header.lineTo(rightX, rightY); - header.closePath(); - - c.getG().fill(header); - - g.setColor(UIUtil.getFocusedBoundsColor()); - - c.getG().draw(header); - - if (myPaintBorder) { - final int down = getHeight() - insets.top - insets.bottom - 1; - g.drawLine(leftX, rightY, leftX, down); - g.drawLine(rightX, rightY, rightX, down); - g.drawLine(leftX, down, rightX, down); - } - - c.restore(); } }; |