mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
status bar should have a height at least of an icon, even before any icons appear, to prevent unnecessary blinking (IDEA-114453)
This commit is contained in:
+12
-1
@@ -52,6 +52,7 @@ import java.util.List;
|
||||
* User: spLeaner
|
||||
*/
|
||||
public class IdeStatusBarImpl extends JComponent implements StatusBarEx {
|
||||
private static final int MIN_ICON_HEIGHT = 18;
|
||||
private final InfoAndProgressPanel myInfoAndProgressPanel;
|
||||
private IdeFrame myFrame;
|
||||
|
||||
@@ -176,6 +177,16 @@ public class IdeStatusBarImpl extends JComponent implements StatusBarEx {
|
||||
this(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension getPreferredSize() {
|
||||
Dimension size = super.getPreferredSize();
|
||||
if (size == null) return null;
|
||||
|
||||
Insets insets = getInsets();
|
||||
int minHeight = insets.top + insets.bottom + MIN_ICON_HEIGHT;
|
||||
return new Dimension(size.width, Math.max(size.height, minHeight));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addWidget(@NotNull final StatusBarWidget widget) {
|
||||
addWidget(widget, Position.RIGHT, "__AUTODETECT__");
|
||||
@@ -839,7 +850,7 @@ public class IdeStatusBarImpl extends JComponent implements StatusBarEx {
|
||||
|
||||
@Override
|
||||
public Dimension getMinimumSize() {
|
||||
return new Dimension(24, 18);
|
||||
return new Dimension(24, MIN_ICON_HEIGHT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user