@Override
    protected void paintChildren(Graphics g) {
      super.paintChildren(g);

      if (myRenderInfo != null) {
        Rectangle bounds = new Rectangle(0, 0, getWidth(), getHeight());
        JBInsets.removeFrom(bounds, getInsets());

        Rectangle text = myTextLabel.getBounds();
        int baseline = myTextLabel.getBaseline(text.width, text.height);

        if (myProjectIcon.getIcon() == null) {
          myProjectIcon.setIcon(AllIcons.General.ProjectConfigurable);
        }
        Dimension icon = myProjectIcon.getPreferredSize();
        Rectangle right = new Rectangle(bounds.x + bounds.width - icon.width, bounds.y, icon.width, icon.height);

        myRenderInfo.second.layoutBeforePaint(myRenderInfo.first, bounds, text, right, baseline);

        Rectangle paintBounds = myRenderInfo.first.getBounds();
        Graphics2D g2 = (Graphics2D)g.create(paintBounds.x, paintBounds.y, paintBounds.width, paintBounds.height);
        myRenderInfo.first.paint(g2);
        g2.dispose();

        myRenderInfo = null;
      }
    }
@Override
    protected void paintChildren(Graphics g)