@Override
  public void paint(Graphics g, JComponent c) {
    if (!(c.getBorder() instanceof MacIntelliJButtonBorder)) {
      super.paint(g, c);
      return;
    }
    int w = c.getWidth();
    int h = c.getHeight();
    if (UIUtil.isHelpButton(c)) {
      Icon icon = MacIconLookup.getIcon("help", false, c.hasFocus(), true);
      int x = (w - icon.getIconWidth()) / 2;
      int y = (h - icon.getIconHeight()) / 2;
      icon.paintIcon(c, g, x, y);
    }
    else {
      AbstractButton b = (AbstractButton)c;
      Graphics2D g2 = (Graphics2D)g.create();
      try {
        g2.translate(0, 0);
        g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
                            MacUIUtil.USE_QUARTZ ? RenderingHints.VALUE_STROKE_PURE : RenderingHints.VALUE_STROKE_NORMALIZE);

        float lw = LW(g2);
        float arc = isTag(c) ? h - lw * 2 : ARC.getFloat();
        Insets i = DarculaButtonUI.isSmallVariant(c) ? JBUI.insets(1) : c.getInsets();

        if (b.isContentAreaFilled()) {
          // Draw background
          Shape outerRect = new RoundRectangle2D.Float(i.left, i.top, w - (i.left + i.right), h - (i.top + i.bottom), arc, arc);
          g2.setPaint(getBackgroundPaint(c));
          g2.fill(outerRect);

          // Draw  outline
          Path2D outline = new Path2D.Float(Path2D.WIND_EVEN_ODD);
          outline.append(outerRect, false);
          outline.append(new RoundRectangle2D.Float(i.left + lw, i.top + lw,
                                                    w - lw * 2 - (i.left + i.right),
                                                    h - lw * 2 - (i.top + i.bottom),
                                                    arc - lw, arc - lw), false);
          g2.setPaint(getBorderPaint(c));
          g2.fill(outline);
        }

        paintContents(g2, b);
      }
      finally {
        g2.dispose();
      }
    }
  }
@Override
  public void paint(Graphics g, JComponent c)