mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-26 12:42:41 +01:00
Qt: smoother compat circles in list mode
This commit is contained in:
parent
f480ba13c0
commit
ea0f04e130
@ -76,13 +76,14 @@ Q_SIGNALS:
|
||||
class compat_pixmap : public QPixmap
|
||||
{
|
||||
public:
|
||||
compat_pixmap(const QColor& color) : QPixmap(16, 16)
|
||||
compat_pixmap(const QColor& color, int pixel_ratio) : QPixmap(16 * pixel_ratio, 16 * pixel_ratio)
|
||||
{
|
||||
fill(Qt::transparent);
|
||||
|
||||
QPainter painter(this);
|
||||
setDevicePixelRatio(pixel_ratio);
|
||||
painter.setPen(color);
|
||||
painter.setBrush(color);
|
||||
painter.drawEllipse(0, 0, 15, 15);
|
||||
painter.drawEllipse(0, 0, 15 * pixel_ratio, 15 * pixel_ratio);
|
||||
}
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "game_list_frame.h"
|
||||
#include "game_list_frame.h"
|
||||
#include "qt_utils.h"
|
||||
#include "settings_dialog.h"
|
||||
#include "table_item_delegate.h"
|
||||
@ -1581,7 +1581,7 @@ int game_list_frame::PopulateGameList()
|
||||
compat_item->setToolTip(game->compat.tooltip);
|
||||
if (!game->compat.color.isEmpty())
|
||||
{
|
||||
compat_item->setData(Qt::DecorationRole, compat_pixmap(game->compat.color));
|
||||
compat_item->setData(Qt::DecorationRole, compat_pixmap(game->compat.color, devicePixelRatio() * 2));
|
||||
}
|
||||
|
||||
// Version
|
||||
|
Loading…
Reference in New Issue
Block a user