mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-19 02:48:49 +00:00
Make Icon Background transparent
This commit is contained in:
parent
aee1eb7907
commit
ec15a46775
@ -25,14 +25,13 @@ static QIcon getIconFor(QString str, int pos) {
|
|||||||
// Add to the icon list
|
// Add to the icon list
|
||||||
int w = 64;
|
int w = 64;
|
||||||
int h = 64;
|
int h = 64;
|
||||||
QPixmap pixmap(w,h);
|
|
||||||
QPainter pixPaint(&pixmap);
|
|
||||||
|
|
||||||
QBrush brush2(Qt::white);
|
QPixmap pixmap(w,h);
|
||||||
pixPaint.setBrush(brush2);
|
pixmap.fill(Qt::transparent);
|
||||||
pixPaint.setPen(Qt::white);
|
|
||||||
|
QPainter pixPaint(&pixmap);
|
||||||
|
pixPaint.setPen(Qt::NoPen);
|
||||||
pixPaint.setRenderHint(QPainter::Antialiasing);
|
pixPaint.setRenderHint(QPainter::Antialiasing);
|
||||||
pixPaint.fillRect(0,0,w,h,Qt::white);
|
|
||||||
pixPaint.setBrush(QBrush(QBrush(getColorFor(str, pos))));
|
pixPaint.setBrush(QBrush(QBrush(getColorFor(str, pos))));
|
||||||
pixPaint.drawEllipse(1,1,w-2,h-2);
|
pixPaint.drawEllipse(1,1,w-2,h-2);
|
||||||
pixPaint.setPen(Qt::white);
|
pixPaint.setPen(Qt::white);
|
||||||
|
Loading…
Reference in New Issue
Block a user