ui: system LAF check optimization

This commit is contained in:
Roman Shevchenko
2015-06-04 14:17:36 +02:00
parent 1c1bc37a44
commit 04e0f1aa8a
@@ -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);