protected void paintDarculaBackground(Graphics g, JTextComponent component) {
    if (component.getClientProperty(JBTextField.IS_FORCE_INNER_BACKGROUND_PAINT) != Boolean.TRUE &&
        (!component.isEnabled() || !component.isEditable())) {
      return;
    }

    Graphics2D g2 = (Graphics2D)g.create();
    Rectangle r = new Rectangle(component.getSize());
    JBInsets.removeFrom(r, paddings());

    try {
      var darculaTextBorderNew = getDarculaTextBorderNew(component);
      if (darculaTextBorderNew != null) {
        darculaTextBorderNew.paintTextBackground(g2, component, component.getBackground());
        return;
      }

      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);

      g2.translate(r.x, r.y);

      float arc = isSearchField(component) ? COMPONENT_ARC.getFloat() : 0.0f;
      float bw = bw();

      g2.setColor(component.getBackground());
      g2.fill(new RoundRectangle2D.Float(bw, bw, r.width - bw * 2, r.height - bw * 2, arc, arc));
    }
    finally {
      g2.dispose();
    }
  }
protected void paintDarculaBackground(Graphics g, JTextComponent component)