Add helper function to create pixmaps from assets with the right resolution for hdpi screens

This commit is contained in:
Luis Ángel San Martín
2022-10-22 16:25:42 +02:00
parent 75c08885be
commit c29eb79d88
2 changed files with 6 additions and 0 deletions

View File

@ -87,3 +87,8 @@ QAction *YACReader::actionWithCustomIcon(const QIcon &icon, QAction *action)
return a;
}
QPixmap YACReader::hdpiPixmap(const QString &file, QSize size)
{
return QIcon(file).pixmap(size);
}