mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-25 02:35:41 +00:00
yuzu/util: Antialias game list compatibility pixmaps
We pass a hint to the QPainter instance that we want anti-aliasing on the compatibility icons, which prevents the circles from looking fairly jagged, and actually makes them look circular.
This commit is contained in:
parent
8e7497d5bb
commit
9dbe9d4291
|
@ -30,8 +30,9 @@ QPixmap CreateCirclePixmapFromColor(const QColor& color) {
|
||||||
QPixmap circle_pixmap(16, 16);
|
QPixmap circle_pixmap(16, 16);
|
||||||
circle_pixmap.fill(Qt::transparent);
|
circle_pixmap.fill(Qt::transparent);
|
||||||
QPainter painter(&circle_pixmap);
|
QPainter painter(&circle_pixmap);
|
||||||
|
painter.setRenderHint(QPainter::Antialiasing);
|
||||||
painter.setPen(color);
|
painter.setPen(color);
|
||||||
painter.setBrush(color);
|
painter.setBrush(color);
|
||||||
painter.drawEllipse(0, 0, 15, 15);
|
painter.drawEllipse({circle_pixmap.width() / 2.0, circle_pixmap.height() / 2.0}, 7.0, 7.0);
|
||||||
return circle_pixmap;
|
return circle_pixmap;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue