Browse Source

Make sure DarculaButtonUI honors the contentAreaFilled property to support icon-only buttons.

master
Hendrik Schreiber 8 years ago
parent
commit
133b7953ba
  1. BIN
      build/darcula.jar
  2. 2
      src/com/bulenkov/darcula/ui/DarculaButtonUI.java

BIN
build/darcula.jar

Binary file not shown.

2
src/com/bulenkov/darcula/ui/DarculaButtonUI.java

@ -45,7 +45,7 @@ public class DarculaButtonUI extends BasicButtonUI {
final Border border = c.getBorder();
final GraphicsConfig config = GraphicsUtil.setupAAPainting(g);
final boolean square = isSquare(c);
if (c.isEnabled() && border != null) {
if (c.isEnabled() && border != null && ((JButton)c).isContentAreaFilled()) {
final Insets ins = border.getBorderInsets(c);
final int yOff = (ins.top + ins.bottom) / 4;
if (!square) {

Loading…
Cancel
Save