@Override
  protected void paintComponent(Graphics g) {
    int count;
    int current;
    BufferedImage image;

    synchronized (myLock) {
      if (myImages == null) {
        return;
      }
      count = myImages.size();
      if (count == 0) {
        return;
      }
      current = myCurrentImage;
      image = myImages.get(current);
    }

    Insets insets = getInsets();
    int x = insets.left;
    int y = insets.top;
    int width = getFullWidth() - insets.left - insets.right;
    int height = getHeight() - insets.top - insets.bottom;
    int offset = JBUI.scale(28);

    if (!myShowFullContent) {
      g.setColor(PluginManagerConfigurable.MAIN_BG_COLOR);
      g.fillRect(x, y, width, height);
    }

    int imageX = insets.left + offset;
    int imageY = insets.top;
    int imageWidth = image.getWidth();
    int imageHeight = image.getHeight();
    int paintWidth = width - 2 * offset;
    int paintHeight = height - offset;

    if (imageWidth <= paintWidth && imageHeight <= paintHeight) {
      StartupUiUtil.drawImage(g, image, imageX + (paintWidth - imageWidth) / 2, imageY + (paintHeight - imageHeight) / 2, null);
    }
    else {
      int zoomedHeight = imageHeight * paintWidth / imageWidth;
      int zoomedWidth = imageWidth * paintHeight / imageHeight;

      if (zoomedWidth <= paintWidth) {
        StartupUiUtil.drawImage(g, image, new Rectangle(imageX + (paintWidth - zoomedWidth) / 2, imageY, zoomedWidth, paintHeight), null);
      }
      else if (zoomedHeight <= paintHeight) {
        StartupUiUtil.drawImage(g, image, new Rectangle(imageX, imageY + (paintHeight - zoomedHeight) / 2, paintWidth, zoomedHeight), null);
      }
      else {
        StartupUiUtil.drawImage(g, image, new Rectangle(imageX, imageY, paintWidth, paintHeight), null);
      }
    }

    Graphics2D g2 = (Graphics2D)g.create();

    try {
      g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
      g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE);

      if (!myShowFullContent) {
        g2.setColor(PluginManagerConfigurable.SEARCH_FIELD_BORDER_COLOR);
        g2.draw(new RoundRectangle2D.Float(x, y, width - 1, height - offset, 7, 7));
      }

      if (count < 2) {
        return;
      }

      int ovalSize = JBUI.scale(myShowFullContent ? 8 : 6);
      int ovalGap = JBUI.scale(14);
      int ovalsWidth = count * ovalSize + (count - 1) * ovalGap;
      int ovalX = x + (width - ovalsWidth) / 2;
      int ovalY = insets.top + height - (offset + ovalSize) / 2;

      for (int i = 0; i < count; i++) {
        if (i == current) {
          g2.setColor(CURRENT_IMAGE_FILL_COLOR);
          g2.fillOval(ovalX, ovalY, ovalSize, ovalSize);
        }
        else {
          g2.setColor(JBUI.CurrentTheme.Button.buttonOutlineColorStart(false));
          g2.drawOval(ovalX, ovalY, ovalSize - 1, ovalSize - 1);
        }
        ovalX += ovalSize + ovalGap;
      }

      if (myHovered) {
        paintAction(g2, x, y, width, height, offset, true);
        paintAction(g2, x, y, width, height, offset, false);
      }
    }
    finally {
      g2.dispose();
    }
  }
@Override
  protected void paintComponent(Graphics g)