Use getArrowButtonPreferredSize(comboBox) instead of arrowButton.getPreferredSize() Pull request 1147

GitOrigin-RevId: 0cd4bc8d2cd5c5ec5aa52d351b2454755a343998
This commit is contained in:
Konstantin Bulenkov
2019-06-12 14:00:33 +03:00
committed by intellij-monorepo-bot
parent 0ea0995680
commit 7e95105b4f
@@ -479,10 +479,7 @@ public class DarculaComboBoxUI extends BasicComboBoxUI implements Border, ErrorB
protected Dimension getSizeWithButton(Dimension size, Dimension editorSize) {
Insets i = getInsets();
Dimension abSize = arrowButton.getPreferredSize();
if (abSize == null) {
abSize = JBUI.emptySize();
}
Dimension abSize = getArrowButtonPreferredSize(comboBox);
if (isCompact(comboBox) && size != null) {
JBInsets.removeFrom(size, padding); // don't count paddings in compact mode