From 9686420b3bf995017e7448c6602ddf17c7155675 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Thu, 27 Oct 2016 17:53:25 +0200 Subject: [PATCH] new look for win10 toolbar button --- .../actionSystem/impl/IdeaActionButtonLook.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/IdeaActionButtonLook.java b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/IdeaActionButtonLook.java index bc37a9dfdf25..2f9b95124a9d 100644 --- a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/IdeaActionButtonLook.java +++ b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/IdeaActionButtonLook.java @@ -83,7 +83,7 @@ public class IdeaActionButtonLook extends ActionButtonLook { } else { final boolean dark = UIUtil.isUnderDarcula(); - final Color pushed = ColorUtil.shift(bg, dark? 1d / 0.7d : UIUtil.isUnderWin10LookAndFeel() ? 0.9d : 0.7d); + final Color pushed = UIUtil.isUnderWin10LookAndFeel() ? Gray.xE6 : ColorUtil.shift(bg, dark? 1d / 0.7d : 0.7d); final Color dark_normal = Gray._255.withAlpha(40); g.setColor(state == ActionButtonComponent.PUSHED ? pushed : dark ? dark_normal : ALPHA_40); ((Graphics2D)g).fill(getShape(size)); @@ -112,8 +112,17 @@ public class IdeaActionButtonLook extends ActionButtonLook { else if (SystemInfo.isMac && UIUtil.isUnderIntelliJLaF()) { //do nothing } + else if (UIUtil.isUnderWin10LookAndFeel()) { + g.setColor(Gray.xC4); + g.drawRect(1, 1, size.width - 3, size.height - 3); + g.setColor(Gray.xD6); + g.drawLine(2, 2, size.width - 3, 2); + g.setColor(Gray.xD9); + g.drawLine(2, 3, 2, size.width - 3); + g.drawLine(size.width - 3, 3, size.width - 3, size.width - 3); + } else { - final double shift = UIUtil.isUnderDarcula() ? 1 / 0.49 : UIUtil.isUnderWin10LookAndFeel() ? 0.75 : 0.49; + final double shift = UIUtil.isUnderDarcula() ? 1 / 0.49 : 0.49; g.setColor(ColorUtil.shift(UIUtil.getPanelBackground(), shift)); ((Graphics2D)g).setStroke(BASIC_STROKE); ((Graphics2D)g).draw(getShape(size));