diff --git a/platform/platform-api/src/com/intellij/ui/ColoredTreeCellRenderer.java b/platform/platform-api/src/com/intellij/ui/ColoredTreeCellRenderer.java index 9ce2b4996769..2f83987452ba 100644 --- a/platform/platform-api/src/com/intellij/ui/ColoredTreeCellRenderer.java +++ b/platform/platform-api/src/com/intellij/ui/ColoredTreeCellRenderer.java @@ -91,7 +91,7 @@ public abstract class ColoredTreeCellRenderer extends SimpleColoredComponent imp setIcon(null); } - if (UIUtil.isUnderNimbusLookAndFeel() && selected && hasFocus) { + if (UIUtil.isUnderGTKLookAndFeel() || UIUtil.isUnderNimbusLookAndFeel() && selected && hasFocus) { super.setOpaque(false); // avoid erasing Nimbus focus frame super.setIconOpaque(false); } diff --git a/platform/util/src/com/intellij/util/ui/UIUtil.java b/platform/util/src/com/intellij/util/ui/UIUtil.java index fd1e75c8c90f..759bca922824 100644 --- a/platform/util/src/com/intellij/util/ui/UIUtil.java +++ b/platform/util/src/com/intellij/util/ui/UIUtil.java @@ -577,6 +577,11 @@ public class UIUtil { return UIManager.getLookAndFeel().getName().contains("Mac OS X"); } + @SuppressWarnings({"HardCodedStringLiteral"}) + public static boolean isUnderGTKLookAndFeel() { + return UIManager.getLookAndFeel().getName().contains("GTK"); + } + public static boolean isFullRowSelectionLAF() { return isUnderNimbusLookAndFeel() || isUnderQuaquaLookAndFeel(); }