mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix progress bar for presentation and distraction free mode for HiDPI Linux
This commit is contained in:
+3
-3
@@ -431,15 +431,15 @@ public class InfoAndProgressPanel extends JPanel implements CustomStatusBarWidge
|
||||
@Override
|
||||
public RelativePoint recalculateLocation(Balloon object) {
|
||||
Component c = getAnchor(pane);
|
||||
int y = c.getHeight() - 45;
|
||||
int y = c.getHeight() - JBUI.scale(45);
|
||||
if (balloonLayout != null && !isBottomSideToolWindowsVisible(pane)) {
|
||||
Component component = balloonLayout.getTopBalloonComponent();
|
||||
if (component != null) {
|
||||
y = SwingUtilities.convertPoint(component, 0, -45, c).y;
|
||||
y = SwingUtilities.convertPoint(component, 0, -JBUI.scale(45), c).y;
|
||||
}
|
||||
}
|
||||
|
||||
return new RelativePoint(c, new Point(c.getWidth() - 150, y));
|
||||
return new RelativePoint(c, new Point(c.getWidth() - JBUI.scale(150), y));
|
||||
}
|
||||
}, Balloon.Position.above);
|
||||
}
|
||||
|
||||
+3
-18
@@ -6,20 +6,13 @@
|
||||
<xy x="20" y="20" width="500" height="94"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<maximumSize width="250" height="60"/>
|
||||
<minimumSize width="250" height="60"/>
|
||||
<opaque value="false"/>
|
||||
<preferredSize width="250" height="60"/>
|
||||
</properties>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="21ac6" class="javax.swing.JLabel" binding="myText">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="209" height="-1"/>
|
||||
<preferred-size width="209" height="-1"/>
|
||||
<maximum-size width="209" height="-1"/>
|
||||
</grid>
|
||||
<grid row="0" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<autoscrolls value="true"/>
|
||||
@@ -28,11 +21,7 @@
|
||||
</component>
|
||||
<component id="94f42" class="javax.swing.JProgressBar" binding="myProgressBar" default-binding="true">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="225" height="-1"/>
|
||||
<preferred-size width="225" height="-1"/>
|
||||
<maximum-size width="225" height="-1"/>
|
||||
</grid>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<indeterminate value="true"/>
|
||||
@@ -41,11 +30,7 @@
|
||||
</component>
|
||||
<component id="34af0" class="javax.swing.JLabel" binding="myText2">
|
||||
<constraints>
|
||||
<grid row="2" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="209" height="-1"/>
|
||||
<preferred-size width="209" height="-1"/>
|
||||
<maximum-size width="209" height="-1"/>
|
||||
</grid>
|
||||
<grid row="2" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value=""/>
|
||||
|
||||
+2
@@ -22,6 +22,7 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.ui.TransparentPanel;
|
||||
import com.intellij.util.containers.JBIterable;
|
||||
import com.intellij.util.ui.EmptyIcon;
|
||||
import com.intellij.util.ui.JBDimension;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -49,6 +50,7 @@ public class PresentationModeProgressPanel {
|
||||
myText2.setIcon(JBUI.scale(EmptyIcon.create(1, 16)));
|
||||
myEastButtons = myProgress.createEastButtons();
|
||||
myButtonPanel.add(InlineProgressIndicator.createButtonPanel(myEastButtons.map(b -> b.button)));
|
||||
myRootPanel.setPreferredSize(new JBDimension(250, 60));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
Reference in New Issue
Block a user