diff --git a/platform/util/src/com/intellij/util/ui/UIUtil.java b/platform/util/src/com/intellij/util/ui/UIUtil.java index 9e292ac28427..9987270fe6df 100644 --- a/platform/util/src/com/intellij/util/ui/UIUtil.java +++ b/platform/util/src/com/intellij/util/ui/UIUtil.java @@ -1265,7 +1265,7 @@ public class UIUtil { @SuppressWarnings({"HardCodedStringLiteral"}) public static boolean isUnderWindowsLookAndFeel() { - return UIManager.getLookAndFeel().getName().equals("Windows"); + return SystemInfo.isWindows && UIManager.getLookAndFeel().getName().equals("Windows"); } @SuppressWarnings({"HardCodedStringLiteral"}) @@ -1305,7 +1305,7 @@ public class UIUtil { @SuppressWarnings({"HardCodedStringLiteral"}) public static boolean isUnderGTKLookAndFeel() { - return UIManager.getLookAndFeel().getName().contains("GTK"); + return SystemInfo.isXWindow && UIManager.getLookAndFeel().getName().contains("GTK"); } public static final Color GTK_AMBIANCE_TEXT_COLOR = new Color(223, 219, 210);