mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-27 07:44:34 +02:00
Use tinted convenience method in ImageRegistry.
This commit is contained in:
@@ -90,17 +90,7 @@ ImageRegistry::pixmap( const QString& image, const QSize& size, TomahawkUtils::I
|
|||||||
pixPainter.end();
|
pixPainter.end();
|
||||||
|
|
||||||
if ( tint.alpha() > 0 )
|
if ( tint.alpha() > 0 )
|
||||||
{
|
p = TomahawkUtils::tinted( p, tint );
|
||||||
QImage resultImage( p.size(), QImage::Format_ARGB32_Premultiplied );
|
|
||||||
QPainter painter( &resultImage );
|
|
||||||
painter.drawPixmap( 0, 0, p );
|
|
||||||
painter.setCompositionMode( QPainter::CompositionMode_Screen );
|
|
||||||
painter.fillRect( resultImage.rect(), tint );
|
|
||||||
painter.end();
|
|
||||||
|
|
||||||
resultImage.setAlphaChannel( p.toImage().alphaChannel() );
|
|
||||||
p = QPixmap::fromImage( resultImage );
|
|
||||||
}
|
|
||||||
|
|
||||||
pixmap = p;
|
pixmap = p;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user