forked from qt-creator/qt-creator
New file overlay icons
Change-Id: Icba67a1404b6e4604aef56def00bfe2098b8c8fe Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user