mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-132765 Floating progress indicator doesn't disappear after exiting Distraction Free mode or Presentation mode
This commit is contained in:
+33
-37
@@ -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<Balloon>(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<Balloon>(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
|
||||
|
||||
+9
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user