mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -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;
|
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 addExtensionToIconPath(const QString &path);
|
||||||
QString addExtensionToIconPathInToolbar(const QString &path);
|
QString addExtensionToIconPathInToolbar(const QString &path);
|
||||||
QAction *actionWithCustomIcon(const QIcon &icon, QAction *action);
|
QAction *actionWithCustomIcon(const QIcon &icon, QAction *action);
|
||||||
|
QPixmap hdpiPixmap(const QString &file, QSize size);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user