mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix UI artifacts after exiting from Presentation Mode
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,6 +29,8 @@ import com.intellij.notification.NotificationType;
|
||||
import com.intellij.notification.Notifications;
|
||||
import com.intellij.openapi.components.*;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.project.ProjectManager;
|
||||
import com.intellij.openapi.ui.JBPopupMenu;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.ui.popup.util.PopupUtil;
|
||||
@@ -36,8 +38,11 @@ import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.openapi.wm.ToolWindow;
|
||||
import com.intellij.openapi.wm.ToolWindowManager;
|
||||
import com.intellij.ui.JBColor;
|
||||
import com.intellij.ui.ScreenUtil;
|
||||
import com.intellij.ui.content.Content;
|
||||
import com.intellij.ui.mac.MacPopupMenuUI;
|
||||
import com.intellij.util.IJSwingUtilities;
|
||||
import com.intellij.util.PlatformUtils;
|
||||
@@ -513,12 +518,33 @@ public final class LafManagerImpl extends LafManager implements ApplicationCompo
|
||||
|
||||
fixSeparatorColor(uiDefaults);
|
||||
|
||||
updateToolWindows();
|
||||
|
||||
for (Frame frame : Frame.getFrames()) {
|
||||
updateUI(frame);
|
||||
}
|
||||
fireLookAndFeelChanged();
|
||||
}
|
||||
|
||||
public static void updateToolWindows() {
|
||||
for (Project project : ProjectManager.getInstance().getOpenProjects()) {
|
||||
final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);
|
||||
for (String id : toolWindowManager.getToolWindowIds()) {
|
||||
final ToolWindow toolWindow = toolWindowManager.getToolWindow(id);
|
||||
for (Content content : toolWindow.getContentManager().getContents()) {
|
||||
final JComponent component = content.getComponent();
|
||||
if (component != null) {
|
||||
IJSwingUtilities.updateComponentTreeUI(component);
|
||||
}
|
||||
}
|
||||
final JComponent c = toolWindow.getComponent();
|
||||
if (c != null) {
|
||||
IJSwingUtilities.updateComponentTreeUI(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void fixMenuIssues(UIDefaults uiDefaults) {
|
||||
if (UIUtil.isUnderAquaLookAndFeel()) {
|
||||
// update ui for popup menu to get round corners
|
||||
@@ -629,7 +655,7 @@ public final class LafManagerImpl extends LafManager implements ApplicationCompo
|
||||
}
|
||||
|
||||
private static void patchFileChooserStrings(final UIDefaults defaults) {
|
||||
if (!defaults.containsKey(ourFileChooserTextKeys [0])) {
|
||||
if (!defaults.containsKey(ourFileChooserTextKeys[0])) {
|
||||
// Alloy L&F does not define strings for names of context menu actions, so we have to patch them in here
|
||||
for (String key : ourFileChooserTextKeys) {
|
||||
defaults.put(key, IdeBundle.message(key));
|
||||
|
||||
Reference in New Issue
Block a user