diff options
Diffstat (limited to 'helper.cpp')
-rw-r--r-- | helper.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -433,7 +433,7 @@ namespace Helper { return retval; } - const QIcon icon(const QColor &bg, const QChar c, bool bold){ + const QIcon icon(const QColor &bg, const QColor &fg, const QChar c, bool bold, bool drawEllipse){ QImage img(32, 32, QImage::Format_ARGB32); img.fill(QColor(0, 0, 0, 0)); QPainter *p = new QPainter(&img); @@ -444,8 +444,10 @@ namespace Helper { QFont f("courier new"); f.setPixelSize(30); f.setBold(bold); - p->setPen(Qt::white); - p->drawEllipse(img.rect()); + p->setPen(fg); + if(drawEllipse){ + p->drawEllipse(img.rect()); + } p->setFont(f); p->drawText(img.rect(), Qt::AlignCenter, c); delete p; |