mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix menu and separators for darcula
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package com.intellij.ide.ui.laf;
|
||||
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.ui.ColorUtil;
|
||||
|
||||
@@ -68,6 +70,12 @@ final class IdeaDarkLaf extends BasicLookAndFeel {
|
||||
final UIDefaults defaults = (UIDefaults)superMethod.invoke(base);
|
||||
LafManagerImpl.initInputMapDefaults(defaults);
|
||||
initIdeaDefaults(defaults);
|
||||
if (SystemInfo.isMac) {
|
||||
defaults.put("Menu.arrowIcon", AllIcons.Mac.Tree_white_right_arrow);
|
||||
defaults.put("MenuItem.acceleratorForeground", new ColorUIResource(255, 255, 255));
|
||||
defaults.put("Separator.foreground", new ColorUIResource(ColorUtil.fromHex("888888")));
|
||||
defaults.put("PopupMenu.background", new ColorUIResource(ColorUtil.fromHex("444444")));
|
||||
}
|
||||
return defaults;
|
||||
}
|
||||
catch (Exception ignore) {
|
||||
|
||||
+1
-1
@@ -713,7 +713,7 @@ public class ActionToolbarImpl extends JPanel implements ActionToolbar {
|
||||
|
||||
protected void paintComponent(final Graphics g) {
|
||||
final Insets insets = getInsets();
|
||||
if (UIUtil.isUnderAquaLookAndFeel()) {
|
||||
if (UIUtil.isUnderAquaBasedLookAndFeel()) {
|
||||
if (getParent() != null) {
|
||||
if (myOrientation == SwingConstants.HORIZONTAL) {
|
||||
UIUtil.drawDoubleSpaceDottedLine((Graphics2D)g, insets.top + 2, getParent().getSize().height - 2 - insets.top - insets.bottom, 3, Color.GRAY, false);
|
||||
|
||||
@@ -68,7 +68,7 @@ public class BegMenuItemUI extends BasicMenuItemUI {
|
||||
public BegMenuItemUI() {
|
||||
myMaxGutterIconWidth = 18;
|
||||
|
||||
if (UIUtil.isUnderAquaLookAndFeel() && myAquaSelectedBackgroundPainter == null) {
|
||||
if (UIUtil.isUnderAquaBasedLookAndFeel() && myAquaSelectedBackgroundPainter == null) {
|
||||
myAquaSelectedBackgroundPainter = (Border) UIManager.get("MenuItem.selectedBackgroundPainter");
|
||||
}
|
||||
}
|
||||
@@ -188,10 +188,10 @@ public class BegMenuItemUI extends BasicMenuItemUI {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (keyStrokeText != null && !keyStrokeText.equals("")){
|
||||
if (keyStrokeText != null && !keyStrokeText.isEmpty()){
|
||||
g.setFont(acceleratorFont);
|
||||
if (buttonmodel.isEnabled()){
|
||||
if (UIUtil.isUnderAquaLookAndFeel() && (buttonmodel.isArmed() || (comp instanceof JMenu) && buttonmodel.isSelected())) {
|
||||
if (UIUtil.isUnderAquaBasedLookAndFeel() && (buttonmodel.isArmed() || (comp instanceof JMenu) && buttonmodel.isSelected())) {
|
||||
g.setColor(selectionForeground);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user