mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
DBE-1671 Exception after start IDE
This commit is contained in:
+3
-2
@@ -19,6 +19,7 @@ import com.intellij.CommonBundle;
|
||||
import com.intellij.ide.WelcomeWizardUtil;
|
||||
import com.intellij.ide.ui.LafManager;
|
||||
import com.intellij.ide.ui.laf.IntelliJLaf;
|
||||
import com.intellij.ide.ui.laf.LafManagerImpl;
|
||||
import com.intellij.ide.ui.laf.darcula.DarculaLaf;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.options.OptionsBundle;
|
||||
@@ -43,7 +44,7 @@ public class CustomizeUIThemeStepPanel extends AbstractCustomizeWizardStep {
|
||||
|
||||
public ThemeInfo(String name, String previewFileName, String laf) {
|
||||
this.name = name;
|
||||
this.previewFileName = previewFileName;
|
||||
this.previewFileName = SystemInfo.isMac && "IntelliJ".equals(previewFileName) ? "Aqua" : previewFileName;
|
||||
this.laf = laf;
|
||||
}
|
||||
|
||||
@@ -130,7 +131,7 @@ public class CustomizeUIThemeStepPanel extends AbstractCustomizeWizardStep {
|
||||
|
||||
protected void initThemes(Collection<ThemeInfo> result) {
|
||||
if (SystemInfo.isMac) {
|
||||
result.add(AQUA);
|
||||
result.add(LafManagerImpl.useIntelliJInsteadOfAqua() ? INTELLIJ : AQUA);
|
||||
result.add(DARCULA);
|
||||
}
|
||||
else if (SystemInfo.isWindows) {
|
||||
|
||||
@@ -124,6 +124,9 @@ public final class LafManagerImpl extends LafManager implements ApplicationCompo
|
||||
ourLafClassesAliases.put("idea.dark.laf.classname", DarculaLookAndFeelInfo.CLASS_NAME);
|
||||
}
|
||||
|
||||
public static boolean useIntelliJInsteadOfAqua() {
|
||||
return Registry.is("ide.mac.yosemite.laf") && isIntelliJLafEnabled() && SystemInfo.isJavaVersionAtLeast("1.8") && SystemInfo.isMacOSYosemite;
|
||||
}
|
||||
/**
|
||||
* Invoked via reflection.
|
||||
*/
|
||||
@@ -133,7 +136,7 @@ public final class LafManagerImpl extends LafManager implements ApplicationCompo
|
||||
List<UIManager.LookAndFeelInfo> lafList = ContainerUtil.newArrayList();
|
||||
|
||||
if (SystemInfo.isMac) {
|
||||
if (Registry.is("ide.mac.yosemite.laf") && isIntelliJLafEnabled() && SystemInfo.isJavaVersionAtLeast("1.8") && SystemInfo.isMacOSYosemite) {
|
||||
if (useIntelliJInsteadOfAqua()) {
|
||||
lafList.add(new UIManager.LookAndFeelInfo("Default", IntelliJLaf.class.getName()));
|
||||
} else {
|
||||
lafList.add(new UIManager.LookAndFeelInfo("Default", UIManager.getSystemLookAndFeelClassName()));
|
||||
@@ -320,7 +323,7 @@ public final class LafManagerImpl extends LafManager implements ApplicationCompo
|
||||
}
|
||||
final String systemLafClassName = UIManager.getSystemLookAndFeelClassName();
|
||||
if (SystemInfo.isMac) {
|
||||
String className = Registry.is("ide.mac.yosemite.laf") ? IntelliJLaf.class.getName() : systemLafClassName;
|
||||
String className = useIntelliJInsteadOfAqua() ? IntelliJLaf.class.getName() : systemLafClassName;
|
||||
UIManager.LookAndFeelInfo laf = findLaf(className);
|
||||
LOG.assertTrue(laf != null, "Could not find look and feel: " + className);
|
||||
return laf;
|
||||
|
||||
Reference in New Issue
Block a user