mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
new borders and default button ui
(cherry-picked from 12e15fa)
This commit is contained in:
@@ -69,7 +69,7 @@ StatusBar.top2Color=2c2c2c
|
||||
StatusBar.bottomColor=2c2c2c
|
||||
|
||||
Button.border=com.intellij.ide.ui.laf.darcula.ui.DarculaButtonPainter
|
||||
#ButtonUI=com.intellij.ide.ui.laf.borders.DarculaButtonUI
|
||||
ButtonUI=com.intellij.ide.ui.laf.darcula.ui.DarculaButtonUI
|
||||
|
||||
MenuItem.acceleratorForeground=eeeeee
|
||||
PopupMenu.translucentBackground=3c3f41
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
# suppress inspection "UnusedProperty" for whole file
|
||||
darcula.selectionBackground=2F65CA
|
||||
darcula.selectionForeground=bbbbbb
|
||||
|
||||
ButtonUI=com.intellij.ide.ui.laf.darcula.ui.DarculaButtonUI
|
||||
#
|
||||
#Tree.line=909090
|
||||
#Tree.hash=909090
|
||||
#Tree.collapsedIcon=AllIcons.Darcula.TreeNodeCollapsed
|
||||
#Tree.expandedIcon=AllIcons.Darcula.TreeNodeExpanded
|
||||
|
||||
PopupMenu.border=com.intellij.ide.ui.laf.darcula.ui.DarculaPopupMenuBorder
|
||||
|
||||
MenuBar.border=com.intellij.ide.ui.laf.darcula.ui.DarculaMenuBarBorder
|
||||
|
||||
#PanelUI=com.intellij.ide.ui.laf.darcula.ui.DarculaPanelUI
|
||||
@@ -1,2 +1,3 @@
|
||||
# suppress inspection "UnusedProperty" for whole file
|
||||
darcula.selectionBackground=2F65CA
|
||||
Menu.arrowIcon=AllIcons.Mac.Tree_white_right_arrow
|
||||
+1
-5
@@ -1,11 +1,7 @@
|
||||
# suppress inspection "UnusedProperty" for whole file
|
||||
darcula.selectionBackground=4B6EAF
|
||||
darcula.selectionForeground=bbbbbb
|
||||
|
||||
ButtonUI=com.intellij.ide.ui.laf.darcula.ui.DarculaButtonUI
|
||||
|
||||
Tree.line=909090
|
||||
Tree.hash=909090
|
||||
|
||||
PopupMenu.border=com.intellij.ide.ui.laf.darcula.ui.DarculaPopupMenuBorder
|
||||
|
||||
MenuBar.border=com.intellij.ide.ui.laf.darcula.ui.DarculaMenuBarBorder
|
||||
+2
-2
@@ -43,9 +43,9 @@ public class DarculaButtonPainter implements Border, UIResource {
|
||||
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
g2d.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_DEFAULT);
|
||||
g2d.setPaint(new GradientPaint(width / 2, y + yOff + 1, Gray._80.withAlpha(90), width / 2, height - 2*yOff, Gray._90.withAlpha(90)));
|
||||
g.drawRoundRect(x + offset + 1, y + yOff + 1, width - 2 * offset, height - 2*yOff, 5, 5);
|
||||
//g.drawRoundRect(x + offset + 1, y + yOff + 1, width - 2 * offset, height - 2*yOff, 5, 5);
|
||||
|
||||
((Graphics2D)g).setPaint(Gray._40.withAlpha(180));
|
||||
((Graphics2D)g).setPaint(Gray._100.withAlpha(180));
|
||||
g.drawRoundRect(x + offset, y + yOff, width - 2 * offset, height - 2*yOff, 5, 5);
|
||||
|
||||
config.restore();
|
||||
|
||||
+11
-14
@@ -32,21 +32,18 @@ public class DarculaButtonUI extends BasicButtonUI {
|
||||
|
||||
@Override
|
||||
public void paint(Graphics g, JComponent c) {
|
||||
if (c.isEnabled()) {
|
||||
final Border border = c.getBorder();
|
||||
if (border != null) {
|
||||
final Insets ins = border.getBorderInsets(c);
|
||||
final int yOff = (ins.top + ins.bottom) / 4;
|
||||
if (((JButton)c).isDefaultButton()) {
|
||||
((Graphics2D)g).setPaint(new GradientPaint(0, 0, new Color(0x384F6B), 0, c.getHeight(), new Color(0x233143)));
|
||||
} else {
|
||||
((Graphics2D)g).setPaint(new GradientPaint(0, 0, new Color(85, 90, 92), 0, c.getHeight(), new Color(65, 70, 72)));
|
||||
}
|
||||
g.fillRoundRect(5, yOff + 1, c.getWidth() - 2 * 4, c.getHeight() - 2 * yOff, 5, 5);
|
||||
final Border border = c.getBorder();
|
||||
if (c.isEnabled() && border != null) {
|
||||
final Insets ins = border.getBorderInsets(c);
|
||||
final int yOff = (ins.top + ins.bottom) / 4;
|
||||
if (((JButton)c).isDefaultButton()) {
|
||||
((Graphics2D)g).setPaint(new GradientPaint(0, 0, new Color(0x384F6B), 0, c.getHeight(), new Color(0x233143)));
|
||||
}
|
||||
else {
|
||||
((Graphics2D)g).setPaint(new GradientPaint(0, 0, new Color(85, 90, 92), 0, c.getHeight(), new Color(65, 70, 72)));
|
||||
}
|
||||
g.fillRoundRect(4, yOff, c.getWidth() - 2 * 4, c.getHeight() - 2 * yOff, 5, 5);
|
||||
}
|
||||
super.paint(g,c);
|
||||
super.paint(g, c);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user