mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-199381 New SE: need to add a minimum height for the result area
This commit is contained in:
+6
@@ -226,6 +226,10 @@ public class SearchEverywhereManagerImpl implements SearchEverywhereManager {
|
||||
return;
|
||||
}
|
||||
|
||||
Dimension minSize = mySearchEverywhereUI.getMinimumSize();
|
||||
JBInsets.addTo(minSize, myBalloon.getContent().getInsets());
|
||||
myBalloon.setMinimumSize(minSize);
|
||||
|
||||
if (viewType == SearchEverywhereUI.ViewType.SHORT) {
|
||||
myBalloonFullSize = myBalloon.getSize();
|
||||
JBInsets.removeFrom(myBalloonFullSize, myBalloon.getContent().getInsets());
|
||||
@@ -235,6 +239,8 @@ public class SearchEverywhereManagerImpl implements SearchEverywhereManager {
|
||||
myBalloonFullSize = mySearchEverywhereUI.getPreferredSize();
|
||||
JBInsets.addTo(myBalloonFullSize, myBalloon.getContent().getInsets());
|
||||
}
|
||||
myBalloonFullSize.height = Integer.max(myBalloonFullSize.height, minSize.height);
|
||||
myBalloonFullSize.width = Integer.max(myBalloonFullSize.width, minSize.width);
|
||||
myBalloon.setSize(myBalloonFullSize);
|
||||
}
|
||||
});
|
||||
|
||||
+10
@@ -74,6 +74,7 @@ public class SearchEverywhereUI extends BigPopupUI implements DataProvider, Quic
|
||||
public static final int SINGLE_CONTRIBUTOR_ELEMENTS_LIMIT = 30;
|
||||
public static final int MULTIPLE_CONTRIBUTORS_ELEMENTS_LIMIT = 15;
|
||||
public static final int THROTTLING_TIMEOUT = 200;
|
||||
public static final int MINIMAL_SUGGESTIONS_LIST_HEIGHT= 100;
|
||||
|
||||
private final List<? extends SearchEverywhereContributor> myServiceContributors;
|
||||
private final List<? extends SearchEverywhereContributor> myShownContributors;
|
||||
@@ -135,6 +136,15 @@ public class SearchEverywhereUI extends BigPopupUI implements DataProvider, Quic
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension getMinimumSize() {
|
||||
Dimension size = super.getMinimumSize();
|
||||
if (getViewType() == ViewType.FULL) {
|
||||
size.height += MINIMAL_SUGGESTIONS_LIST_HEIGHT;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
protected CompositeCellRenderer createCellRenderer() {
|
||||
|
||||
Reference in New Issue
Block a user