mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't let lookups grow indefinitely
This commit is contained in:
@@ -1376,7 +1376,7 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable
|
||||
|
||||
Dimension adSize = myAdComponent.getAdComponent().getPreferredSize();
|
||||
|
||||
int panelHeight = myList.getPreferredSize().height + adSize.height;
|
||||
int panelHeight = myList.getPreferredScrollableViewportSize().height + adSize.height;
|
||||
if (getListModel().getSize() > myList.getVisibleRowCount() && myList.getVisibleRowCount() >= 5) {
|
||||
panelHeight -= myList.getFixedCellHeight() / 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user