mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
new look for win10 toolbar button
This commit is contained in:
+11
-2
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user