From 9dbe9d42914adc007cab42fd1c73f5f52313ec71 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 17 Sep 2018 05:57:23 -0400 Subject: 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. --- src/yuzu/util/util.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/yuzu/util/util.cpp b/src/yuzu/util/util.cpp index e99042a23..62c080aff 100644 --- a/src/yuzu/util/util.cpp +++ b/src/yuzu/util/util.cpp @@ -30,8 +30,9 @@ QPixmap CreateCirclePixmapFromColor(const QColor& color) { QPixmap circle_pixmap(16, 16); circle_pixmap.fill(Qt::transparent); QPainter painter(&circle_pixmap); + painter.setRenderHint(QPainter::Antialiasing); painter.setPen(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; } -- cgit v1.2.3