Compare commits

..

1 Commits

Author SHA1 Message Date
Lioncash
9dbe9d4291 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.
2018-09-17 06:01:14 -04:00
4 changed files with 14 additions and 7 deletions

View File

@@ -6,7 +6,8 @@
#include "core/hle/service/acc/acc.h"
namespace Service::Account {
namespace Service {
namespace Account {
class ACC_SU final : public Module::Interface {
public:
@@ -15,4 +16,5 @@ public:
~ACC_SU() override;
};
} // namespace Service::Account
} // namespace Account
} // namespace Service

View File

@@ -9,7 +9,8 @@
#include "core/core.h"
#include "core/hle/service/nvflinger/buffer_queue.h"
namespace Service::NVFlinger {
namespace Service {
namespace NVFlinger {
BufferQueue::BufferQueue(u32 id, u64 layer_id) : id(id), layer_id(layer_id) {
auto& kernel = Core::System::GetInstance().Kernel();
@@ -103,4 +104,5 @@ u32 BufferQueue::Query(QueryType type) {
return 0;
}
} // namespace Service::NVFlinger
} // namespace NVFlinger
} // namespace Service

View File

@@ -15,7 +15,8 @@ namespace CoreTiming {
struct EventType;
}
namespace Service::NVFlinger {
namespace Service {
namespace NVFlinger {
struct IGBPBuffer {
u32_le magic;
@@ -97,4 +98,5 @@ private:
Kernel::SharedPtr<Kernel::Event> buffer_wait_event;
};
} // namespace Service::NVFlinger
} // namespace NVFlinger
} // namespace Service

View File

@@ -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;
}