IDEA-133243 Find (Ctrl+F) popup options displayed offscreen

This commit is contained in:
Sergey Malenkov
2014-11-21 22:14:07 +03:00
parent d76b2c69ed
commit f5890dc8be
@@ -983,6 +983,7 @@ public class ActionToolbarImpl extends JPanel implements ActionToolbar {
}
};
popupToolbar.setLayoutPolicy(NOWRAP_LAYOUT_POLICY);
popupToolbar.updateActionsImmediately();
Point location;
if (myOrientation == SwingConstants.HORIZONTAL) {
@@ -996,6 +997,7 @@ public class ActionToolbarImpl extends JPanel implements ActionToolbar {
final ComponentPopupBuilder builder = JBPopupFactory.getInstance().createComponentPopupBuilder(popupToolbar, null);
builder.setResizable(false)
.setMovable(true) // fit the screen automatically
.setRequestFocus(false)
.setTitle(null)
.setCancelOnClickOutside(true)