From 4dad6c3c7c30c6aff5fe6b9ce89c99da3d058445 Mon Sep 17 00:00:00 2001 From: irengrig Date: Mon, 27 Feb 2012 14:14:46 +0400 Subject: [PATCH] IDEA-81876 blank line shows for selection --- .../util/src/com/intellij/util/ui/UIUtil.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/platform/util/src/com/intellij/util/ui/UIUtil.java b/platform/util/src/com/intellij/util/ui/UIUtil.java index 57d076d17dc8..1ae4f2cd7e12 100644 --- a/platform/util/src/com/intellij/util/ui/UIUtil.java +++ b/platform/util/src/com/intellij/util/ui/UIUtil.java @@ -436,6 +436,12 @@ public class UIUtil { } public static Color getTreeSelectionBackground() { + if (isUnderNimbusLookAndFeel()) { + Color color = UIManager.getColor("Tree.nimbusSelectionBackground"); + if (color != null) return color; + color = UIManager.getColor("nimbusSelectionBackground"); + if (color != null) return color; + } return UIManager.getColor("Tree.selectionBackground"); } @@ -456,6 +462,12 @@ public class UIUtil { } public static Color getTableSelectionBackground() { + if (isUnderNimbusLookAndFeel()) { + Color color = UIManager.getColor("Table.nimbusSelectionBackground"); + if (color != null) return color; + color = UIManager.getColor("nimbusSelectionBackground"); + if (color != null) return color; + } return UIManager.getColor("Table.selectionBackground"); } @@ -613,6 +625,12 @@ public class UIUtil { } public static Color getListSelectionBackground() { + if (isUnderNimbusLookAndFeel()) { + Color color = UIManager.getColor("List.nimbusSelectionBackground"); + if (color != null) return color; + color = UIManager.getColor("nimbusSelectionBackground"); + if (color != null) return color; + } final Color color = UIManager.getColor("List.selectionBackground"); if (color == null) { return UIManager.getColor("List[Selected].textBackground"); // Nimbus