From d8f57cd2433ad034cef71f72e4ed15add1993907 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Tue, 4 Dec 2012 18:54:41 +0100 Subject: [PATCH] IDEA-96584 Selected radio button glitch (cherry picked from commit 79f74a8bf5c707f3e09967def652de502e1d914f) --- .../ui/laf/darcula/ui/DarculaRadioButtonUI.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/ui/laf/darcula/ui/DarculaRadioButtonUI.java b/platform/platform-impl/src/com/intellij/ide/ui/laf/darcula/ui/DarculaRadioButtonUI.java index a1a5477e7255..7e5903bc01cb 100644 --- a/platform/platform-impl/src/com/intellij/ide/ui/laf/darcula/ui/DarculaRadioButtonUI.java +++ b/platform/platform-impl/src/com/intellij/ide/ui/laf/darcula/ui/DarculaRadioButtonUI.java @@ -81,32 +81,31 @@ public class DarculaRadioButtonUI extends MetalRadioButtonUI { final int y = iconRect.y + 2; final int w = iconRect.width - 4; final int h = iconRect.height - 4; - final int u = w / 16; g.translate(x, y); //setup AA for lines final GraphicsConfig config = GraphicsUtil.setupAAPainting(g); g.setPaint(new GradientPaint(0, 0, ColorUtil.shift(c.getBackground(), 1.5), 0, c.getHeight(), ColorUtil.shift(c.getBackground(), 1.2))); - g.fillOval(0, 2, w - 2, h - 2); + g.fillOval(0, 1, w - 1, h - 1); if (b.hasFocus()) { int sysOffX = SystemInfo.isMac ? 0 : 1; int sysOffY = SystemInfo.isMac ? 0 : -1; - DarculaUIUtil.paintFocusOval(g, x-6 + sysOffX, y-3 + sysOffY, w-3, h-3); + DarculaUIUtil.paintFocusOval(g, x-6 + sysOffX, y-3 + sysOffY, w-2, h-2); } else { g.setPaint(new GradientPaint(w / 2, 1, Gray._160.withAlpha(90), w / 2, h, Gray._100.withAlpha(90))); - g.drawOval(0, 2, w - 2, h - 2); + g.drawOval(0, 2, w - 1, h - 1); g.setPaint(Gray._40.withAlpha(200)); - g.drawOval(0, 1, w - 2, h - 2); + g.drawOval(0, 1, w - 1, h - 1); } if (b.isSelected()) { - g.setColor(Gray._0.withAlpha(50)); - g.fillOval(w/2 - 3*u+1, h/2 - 3*u + 2, 5*u, 5*u); + g.setColor(Gray._0.withAlpha(120)); + g.fillOval(w/2 - 3, h/2 - 1, 5, 5); g.setColor(Gray._255.withAlpha(180)); - g.fillOval(w/2 - 3*u, h/2 - 3*u + 1, 5*u, 5*u); + g.fillOval(w/2 - 3, h/2 - 2, 5, 5); } config.restore(); g.translate(-x, -y);