verride
  public void layout(@NotNull Rectangle bounds) {
    Dimension closeSize = myCloseButton.getPreferredSize();
    Insets borderInsets = myBalloon.getShadowBorderInsets();
    int x = bounds.x + bounds.width - borderInsets.right - closeSize.width - myLayoutData.configuration.rightActionsOffset.width;
    int y = bounds.y + borderInsets.top + myLayoutData.configuration.rightActionsOffset.height;
    myCloseButton.setBounds(x - CloseHoverBounds.x, y - CloseHoverBounds.y,
                            closeSize.width + CloseHoverBounds.width, closeSize.height + CloseHoverBounds.height);

    if (myMoreButton != null) {
      Dimension size = myMoreButton.getPreferredSize();
      if (ExperimentalUI.isNewUI()) {
        myMoreButton.setBounds(x - size.width - myLayoutData.configuration.gearCloseSpace - CloseHoverBounds.x, y - CloseHoverBounds.y,
                               size.width + CloseHoverBounds.width, size.height + CloseHoverBounds.height);
      }
      else {
        myMoreButton.setBounds(x - size.width - myLayoutData.configuration.gearCloseSpace, y, size.width, size.height);
      }
    }
  }


verride
  public void layout(@NotNull Rectangle bounds) {