mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Add helper function to create pixmaps from assets with the right resolution for hdpi screens
This commit is contained in:
parent
75c08885be
commit
c29eb79d88
@ -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);
|
||||
}
|
||||
|
@ -113,6 +113,7 @@ QList<qulonglong> mimeDataToComicsIds(const QMimeData *data);
|
||||
QString addExtensionToIconPath(const QString &path);
|
||||
QString addExtensionToIconPathInToolbar(const QString &path);
|
||||
QAction *actionWithCustomIcon(const QIcon &icon, QAction *action);
|
||||
QPixmap hdpiPixmap(const QString &file, QSize size);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user