mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use the same code for determining popup size, when positioning popup wrt editor and other elements
This commit is contained in:
@@ -555,13 +555,7 @@ public class AbstractPopup implements JBPopup {
|
||||
@NotNull
|
||||
private RelativePoint guessBestPopupLocation(@NotNull Editor editor) {
|
||||
RelativePoint preferredLocation = JBPopupFactory.getInstance().guessBestPopupLocation(editor);
|
||||
Dimension targetSize = myDimensionServiceKey == null ? null : DimensionService.getInstance().getSize(myDimensionServiceKey, myProject);
|
||||
if (targetSize == null) {
|
||||
targetSize = getSize();
|
||||
}
|
||||
if (targetSize == null) {
|
||||
targetSize = myComponent.getPreferredSize();
|
||||
}
|
||||
Dimension targetSize = getSizeForPositioning();
|
||||
Point preferredPoint = preferredLocation.getScreenPoint();
|
||||
Point result = getLocationAboveEditorLineIfPopupIsClippedAtTheBottom(preferredPoint, targetSize, editor);
|
||||
if (myLocateWithinScreen) {
|
||||
|
||||
Reference in New Issue
Block a user