diff options
| author | 2018-09-17 05:57:23 -0400 | |
|---|---|---|
| committer | 2018-09-17 06:01:14 -0400 | |
| commit | 9dbe9d42914adc007cab42fd1c73f5f52313ec71 (patch) | |
| tree | 0702c7fecbb6d6f0bb641089bc713569033d08bb /src | |
| parent | Merge pull request #1308 from valentinvanelslande/ipc (diff) | |
| download | yuzu-9dbe9d42914adc007cab42fd1c73f5f52313ec71.tar.gz yuzu-9dbe9d42914adc007cab42fd1c73f5f52313ec71.tar.xz yuzu-9dbe9d42914adc007cab42fd1c73f5f52313ec71.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/util/util.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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) { | |||
| 30 | QPixmap circle_pixmap(16, 16); | 30 | QPixmap circle_pixmap(16, 16); |
| 31 | circle_pixmap.fill(Qt::transparent); | 31 | circle_pixmap.fill(Qt::transparent); |
| 32 | QPainter painter(&circle_pixmap); | 32 | QPainter painter(&circle_pixmap); |
| 33 | painter.setRenderHint(QPainter::Antialiasing); | ||
| 33 | painter.setPen(color); | 34 | painter.setPen(color); |
| 34 | painter.setBrush(color); | 35 | painter.setBrush(color); |
| 35 | painter.drawEllipse(0, 0, 15, 15); | 36 | painter.drawEllipse({circle_pixmap.width() / 2.0, circle_pixmap.height() / 2.0}, 7.0, 7.0); |
| 36 | return circle_pixmap; | 37 | return circle_pixmap; |
| 37 | } | 38 | } |