| 23 | #include <QVBoxLayout> |
| 24 | |
| 25 | QPixmap textIcon(const QString& str, const QColor& fg = Qt::black, const QColor& bg = Qt::white) |
| 26 | { |
| 27 | QPixmap ret(40, 40); |
| 28 | QPainter p(&ret); |
| 29 | QFont font = p.font(); |
| 30 | font.setPixelSize(0.625 * 40); |
| 31 | p.setFont(font); |
| 32 | ret.fill(bg); |
| 33 | p.setPen(fg); |
| 34 | p.drawText(ret.rect(), Qt::AlignCenter, str); |
| 35 | return ret; |
| 36 | } |
| 37 | |
| 38 | SimpleCommitForm::SimpleCommitForm(QWidget* parent) |
| 39 | : QWidget(parent) |