summaryrefslogtreecommitdiffstats
path: root/helper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'helper.cpp')
-rw-r--r--helper.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/helper.cpp b/helper.cpp
index 5e52bb2..d9a2856 100644
--- a/helper.cpp
+++ b/helper.cpp
@@ -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;