Dimension (JComponent c) { AbstractButton b = (AbstractButton)c; int textIconGap = StringUtil.isEmpty(b.getText()) || b.getIcon() == null ? 0 : b.getIconTextGap(); Dimension size = BasicGraphicsUtils.getPreferredButtonSize(b, textIconGap); return getDarculaButtonSize(c, size); }