From 455ca8f5b6cf65afbbaa3e2b8aa9138817fbfc98 Mon Sep 17 00:00:00 2001 From: Sergey Simonchik Date: Fri, 24 Jan 2014 17:23:39 +0400 Subject: [PATCH] WEB-10733 Mac OSX: disabling JSHint results in buggy presentation of version combo --- platform/util/src/com/intellij/util/ui/UIUtil.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/platform/util/src/com/intellij/util/ui/UIUtil.java b/platform/util/src/com/intellij/util/ui/UIUtil.java index 1b012a7634a8..dbc27eca740a 100644 --- a/platform/util/src/com/intellij/util/ui/UIUtil.java +++ b/platform/util/src/com/intellij/util/ui/UIUtil.java @@ -356,6 +356,11 @@ public class UIUtil { public static void setEnabled(Component component, boolean enabled, boolean recursively) { component.setEnabled(enabled); + if (component instanceof JComboBox) { + // On Mac JComboBox instances have children: com.apple.laf.AquaComboBoxButton and javax.swing.CellRendererPane. + // Disabling these children results in ugly UI. See WEB-10733 + return; + } if (component instanceof JLabel) { Color color = enabled ? getLabelForeground() : getLabelDisabledForeground(); if (color != null) { @@ -2668,7 +2673,7 @@ public class UIUtil { } } - private static final Color DECORATED_ROW_BG_COLOR = new JBColor(new Color(242, 245, 249), new Color(65, 69, 71)); + private static final Color DECORATED_ROW_BG_COLOR = new JBColor(new Color(242, 245, 249), new Color(79, 83, 84)); public static Color getDecoratedRowColor() { return DECORATED_ROW_BG_COLOR;