mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Support for Distraction Free Mode
This commit is contained in:
@@ -449,6 +449,10 @@ public final class ToolWindowsPane extends JBLayeredPane implements Disposable {
|
||||
return myBottomStripe.isVisible() ? myBottomStripe.getHeight() : 0;
|
||||
}
|
||||
|
||||
public boolean isBottomSideToolWindowsVisible() {
|
||||
return getComponentAt(ToolWindowAnchor.BOTTOM) != null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
Stripe getStripeFor(String id) {
|
||||
ToolWindow window = myManager.getToolWindow(id);
|
||||
|
||||
+7
-1
@@ -37,6 +37,7 @@ import com.intellij.openapi.wm.IdeFrame;
|
||||
import com.intellij.openapi.wm.StatusBar;
|
||||
import com.intellij.openapi.wm.StatusBarWidget;
|
||||
import com.intellij.openapi.wm.ex.ProgressIndicatorEx;
|
||||
import com.intellij.openapi.wm.impl.ToolWindowsPane;
|
||||
import com.intellij.ui.BalloonLayoutImpl;
|
||||
import com.intellij.ui.Gray;
|
||||
import com.intellij.ui.TabbedPaneWrapper;
|
||||
@@ -434,7 +435,7 @@ public class InfoAndProgressPanel extends JPanel implements CustomStatusBarWidge
|
||||
public RelativePoint recalculateLocation(Balloon object) {
|
||||
Component c = getAnchor(pane);
|
||||
int y = c.getHeight() - 45;
|
||||
if (balloonLayout != null) {
|
||||
if (balloonLayout != null && !isBottomSideToolWindowsVisible(pane)) {
|
||||
Component component = balloonLayout.getTopBalloonComponent();
|
||||
if (component != null) {
|
||||
y = SwingUtilities.convertPoint(component, 0, -45, c).y;
|
||||
@@ -465,6 +466,11 @@ public class InfoAndProgressPanel extends JPanel implements CustomStatusBarWidge
|
||||
return ex == null ? pane : ex.getSplitters();
|
||||
}
|
||||
|
||||
private static boolean isBottomSideToolWindowsVisible(@NotNull JRootPane parent) {
|
||||
ToolWindowsPane pane = UIUtil.findComponentOfType(parent, ToolWindowsPane.class);
|
||||
return pane != null && pane.isBottomSideToolWindowsVisible();
|
||||
}
|
||||
|
||||
public Couple<String> setText(@Nullable final String text, @Nullable final String requestor) {
|
||||
if (StringUtil.isEmpty(text) && !Comparing.equal(requestor, myCurrentRequestor) && !EventLog.LOG_REQUESTOR.equals(requestor)) {
|
||||
return Couple.of(myInfoPanel.getText(), myCurrentRequestor);
|
||||
|
||||
Reference in New Issue
Block a user