mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-185543 increase height of the GoToClass popup
This commit is contained in:
@@ -125,7 +125,6 @@ public abstract class ChooseByNameBase {
|
||||
|
||||
private final String[][] myNames = new String[2][];
|
||||
private volatile CalcElementsThread myCalcElementsThread;
|
||||
private static int VISIBLE_LIST_SIZE_LIMIT = 10;
|
||||
private int myListSizeIncreasing = 30;
|
||||
private int myMaximumListSizeLimit = 30;
|
||||
@NonNls private static final String NOT_FOUND_IN_PROJECT_CARD = "syslib";
|
||||
@@ -624,6 +623,7 @@ public abstract class ChooseByNameBase {
|
||||
|
||||
//noinspection unchecked
|
||||
myList.setCellRenderer(myModel.getListCellRenderer());
|
||||
myList.setVisibleRowCount(16);
|
||||
myList.setFont(editorFont);
|
||||
|
||||
myList.addListSelectionListener(new ListSelectionListener() {
|
||||
@@ -806,9 +806,6 @@ public abstract class ChooseByNameBase {
|
||||
final int paneHeight = layeredPane.getHeight();
|
||||
final int y = paneHeight / 3 - preferredTextFieldPanelSize.height / 2;
|
||||
|
||||
VISIBLE_LIST_SIZE_LIMIT = Math.max
|
||||
(10, (paneHeight - (y + preferredTextFieldPanelSize.height)) / (preferredTextFieldPanelSize.height / 2) - 1);
|
||||
|
||||
ComponentPopupBuilder builder = JBPopupFactory.getInstance().createComponentPopupBuilder(myTextFieldPanel, myTextField);
|
||||
builder.setLocateWithinScreenBounds(false);
|
||||
builder.setKeyEventHandler(event -> {
|
||||
@@ -969,12 +966,10 @@ public abstract class ChooseByNameBase {
|
||||
myTextField.setForeground(UIUtil.getTextFieldForeground());
|
||||
if (commands == null || commands.isEmpty()) {
|
||||
applySelection(pos);
|
||||
myList.setVisibleRowCount(Math.min(VISIBLE_LIST_SIZE_LIMIT, myList.getModel().getSize()));
|
||||
showList();
|
||||
myTextFieldPanel.repositionHint();
|
||||
}
|
||||
else {
|
||||
showList();
|
||||
appendToModel(commands, pos);
|
||||
}
|
||||
}
|
||||
@@ -1032,8 +1027,6 @@ public abstract class ChooseByNameBase {
|
||||
for (ModelDiff.Cmd command : commands) {
|
||||
command.apply();
|
||||
}
|
||||
|
||||
myList.setVisibleRowCount(Math.min(VISIBLE_LIST_SIZE_LIMIT, myList.getModel().getSize()));
|
||||
showList();
|
||||
|
||||
myTextFieldPanel.repositionHint();
|
||||
|
||||
Reference in New Issue
Block a user