From 6a45dd30ffd9459dfddf41e663e59fd067bd64e0 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Fri, 7 Dec 2012 01:23:59 +0100 Subject: [PATCH] IDEA-96535 Darcula: dop-out Commit button has misplaces arrow icon --- .../src/com/intellij/ui/components/JBOptionButton.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/platform-api/src/com/intellij/ui/components/JBOptionButton.java b/platform/platform-api/src/com/intellij/ui/components/JBOptionButton.java index 68c4bd9fdcca..ef87213e455c 100644 --- a/platform/platform-api/src/com/intellij/ui/components/JBOptionButton.java +++ b/platform/platform-api/src/com/intellij/ui/components/JBOptionButton.java @@ -363,8 +363,10 @@ public class JBOptionButton extends JButton implements MouseMotionListener { @Override protected void paintChildren(Graphics g) { super.paintChildren(g); - AllIcons.General.ArrowDown.paintIcon(this, g, myMoreRec.x, myMoreRec.y); - + boolean dark = UIUtil.isUnderDarcula(); + int off = dark ? 6 : 0; + AllIcons.General.ArrowDown.paintIcon(this, g, myMoreRec.x - off, myMoreRec.y); + if (dark) return; int y1 = myMoreRec.y - 2; int y2 = myMoreRec.y + myMoreRec.height + 2;