From 04e0f1aa8a7146d09c1a19a11867f317614c1dfe Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Thu, 4 Jun 2015 14:17:36 +0200 Subject: [PATCH] ui: system LAF check optimization --- platform/util/src/com/intellij/util/ui/UIUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);