IDEA-191985 Speed search is truncated

This commit is contained in:
Kirill Kirichenko
2018-05-16 12:00:52 +03:00
parent 41160a90cb
commit da847dfb7b
@@ -477,7 +477,8 @@ public abstract class SpeedSearchBase<Comp extends JComponent> extends SpeedSear
@Override
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.width = getFontMetrics(getFont()).stringWidth(getText()) + 10;
Insets m = getMargin();
dim.width = getFontMetrics(getFont()).stringWidth(getText()) + 10 + m.left + m.right;
return dim;
}