New file overlay icons

Change-Id: Icba67a1404b6e4604aef56def00bfe2098b8c8fe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Alessandro Portale
2016-04-22 15:42:30 +02:00
parent 600693af2c
commit fdad4bf7b0
52 changed files with 389 additions and 63 deletions

View File

@@ -155,11 +155,10 @@ QIcon icon(QFileIconProvider::IconType type)
*/
QPixmap overlayIcon(const QPixmap &baseIcon, const QIcon &overlayIcon)
{
QPixmap iconPixmap = baseIcon;
QPainter painter(&iconPixmap);
painter.drawPixmap(0, 0, overlayIcon.pixmap(baseIcon.size()));
painter.end();
return iconPixmap;
QPixmap result = baseIcon;
QPainter painter(&result);
overlayIcon.paint(&painter, QRect(QPoint(), result.size() / result.devicePixelRatio()));
return result;
}
/*!