boolean (Icon icon) { this.icon = icon; Dimension size = extension.getButtonSize(); int width; int height; if (size == null) { int doubleIconInset = ExperimentalUI.isNewUI() ? JBUI.scale(1) * 2 : 0; width = icon == null ? 0 : icon.getIconWidth() + doubleIconInset; height = icon == null ? 0 : icon.getIconHeight() + doubleIconInset; } else { width = size.width; height = size.height; } if (bounds.width == width && bounds.height == height) { return false; } bounds.setSize(width, height); return true; }