mirror of
				https://github.com/YACReader/yacreader
				synced 2025-10-31 00:04:26 -04:00 
			
		
		
		
	Add helper function to create pixmaps from assets with the right resolution for hdpi screens
This commit is contained in:
		| @ -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 | ||||
|  | ||||
		Reference in New Issue
	
	Block a user