diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/InfoAndProgressPanel.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/InfoAndProgressPanel.java index a3ae87811322..5f76c973effe 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/InfoAndProgressPanel.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/InfoAndProgressPanel.java @@ -15,7 +15,6 @@ */ package com.intellij.openapi.wm.impl.status; -import com.intellij.ide.ui.UISettings; import com.intellij.idea.ActionsBundle; import com.intellij.notification.EventLog; import com.intellij.openapi.actionSystem.ActionGroup; @@ -376,45 +375,42 @@ public class InfoAndProgressPanel extends JPanel implements CustomStatusBarWidge myRefreshAndInfoPanel.revalidate(); myRefreshAndInfoPanel.repaint(); - UISettings uiSettings = UISettings.getInstance(); - if (uiSettings.PRESENTATION_MODE || !uiSettings.SHOW_STATUS_BAR && Registry.is("ide.show.progress.without.status.bar")) { - final JRootPane pane = myInfoPanel.getRootPane(); - assert pane != null; - final PresentationModeProgressPanel panel = new PresentationModeProgressPanel(inline); - final MyInlineProgressIndicator delegate = new MyInlineProgressIndicator(true, inline.getInfo(), inline) { - @Override - protected void updateProgress() { - super.updateProgress(); - panel.update(); - } - }; + final JRootPane pane = myInfoPanel.getRootPane(); + assert pane != null; + final PresentationModeProgressPanel panel = new PresentationModeProgressPanel(inline); + MyInlineProgressIndicator delegate = new MyInlineProgressIndicator(true, inline.getInfo(), inline) { + @Override + protected void updateProgress() { + super.updateProgress(); + panel.update(); + } + }; - Disposer.register(inline, delegate); + Disposer.register(inline, delegate); - final Component anchor = getAnchor(pane); + Component anchor = getAnchor(pane); - JBPopupFactory.getInstance().createBalloonBuilder(panel.getProgressPanel()) - .setFadeoutTime(0) - .setFillColor(Gray.TRANSPARENT) - .setShowCallout(false) - .setBorderColor(Gray.TRANSPARENT) - .setBorderInsets(JBUI.emptyInsets()) - .setAnimationCycle(0) - .setCloseButtonEnabled(false) - .setHideOnClickOutside(false) - .setDisposable(inline) - .setHideOnFrameResize(false) - .setHideOnKeyOutside(false) - .setBlockClicksThroughBalloon(true) - .setHideOnAction(false) - .createBalloon().show(new PositionTracker(anchor) { - @Override - public RelativePoint recalculateLocation(Balloon object) { - Component c = getAnchor(pane); - return new RelativePoint(c, new Point(c.getWidth() - 150, c.getHeight() - 45)); - } - }, Balloon.Position.above); - } + JBPopupFactory.getInstance().createBalloonBuilder(panel.getProgressPanel()) + .setFadeoutTime(0) + .setFillColor(Gray.TRANSPARENT) + .setShowCallout(false) + .setBorderColor(Gray.TRANSPARENT) + .setBorderInsets(JBUI.emptyInsets()) + .setAnimationCycle(0) + .setCloseButtonEnabled(false) + .setHideOnClickOutside(false) + .setDisposable(inline) + .setHideOnFrameResize(false) + .setHideOnKeyOutside(false) + .setBlockClicksThroughBalloon(true) + .setHideOnAction(false) + .createBalloon().show(new PositionTracker(anchor) { + @Override + public RelativePoint recalculateLocation(Balloon object) { + Component c = getAnchor(pane); + return new RelativePoint(c, new Point(c.getWidth() - 150, c.getHeight() - 45)); + } + }, Balloon.Position.above); } @NotNull diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/PresentationModeProgressPanel.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/PresentationModeProgressPanel.java index c219b98bbf74..badefdc4bb23 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/PresentationModeProgressPanel.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/PresentationModeProgressPanel.java @@ -16,8 +16,10 @@ package com.intellij.openapi.wm.impl.status; import com.intellij.icons.AllIcons; +import com.intellij.ide.ui.UISettings; import com.intellij.openapi.editor.colors.EditorColorsManager; import com.intellij.openapi.ui.popup.IconButton; +import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.text.StringUtil; import com.intellij.ui.InplaceButton; import com.intellij.ui.TransparentPanel; @@ -98,7 +100,13 @@ public class PresentationModeProgressPanel { } private void createUIComponents() { - myRootPanel = new TransparentPanel(0.5f); + myRootPanel = new TransparentPanel(0.5f) { + @Override + public boolean isVisible() { + UISettings ui = UISettings.getInstance(); + return ui.PRESENTATION_MODE || !ui.SHOW_STATUS_BAR && Registry.is("ide.show.progress.without.status.bar"); + } + }; final IconButton iconButton = new IconButton(myProgress.getInfo().getCancelTooltipText(), AllIcons.Process.Stop, AllIcons.Process.StopHovered);