diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-05-07 02:39:26 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-05-07 02:39:26 -0500 |
commit | 24e3f6f2fad88b7a3c28f127dff5f02cd41fed99 (patch) | |
tree | 4c042bb6fc44be3a1fc1e147aefbba55c30f7c72 /tdm/kfrontend/themer/tdmpixmap.cpp | |
parent | 9aa01ee718181904f2bfae853c36b127c3ee23a1 (diff) | |
download | tdebase-24e3f6f2fad88b7a3c28f127dff5f02cd41fed99.tar.gz tdebase-24e3f6f2fad88b7a3c28f127dff5f02cd41fed99.zip |
Fix lock screen interaction with suspend/hibernate
Use built-in premultiplied ARGB method
Diffstat (limited to 'tdm/kfrontend/themer/tdmpixmap.cpp')
-rw-r--r-- | tdm/kfrontend/themer/tdmpixmap.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/tdm/kfrontend/themer/tdmpixmap.cpp b/tdm/kfrontend/themer/tdmpixmap.cpp index 2e15218fb..d9042b426 100644 --- a/tdm/kfrontend/themer/tdmpixmap.cpp +++ b/tdm/kfrontend/themer/tdmpixmap.cpp @@ -304,21 +304,8 @@ KdmPixmap::drawContents( TQPainter *p, const TQRect &r ) // Convert pixmap from premultiplied alpha to normal alpha { if (scaledImage.isNull()) scaledImage = pClass->readyPixmap; - if (!scaledImage.isNull()) scaledImage = scaledImage.convertDepth( 32 ); - int w = scaledImage.width(); - int h = scaledImage.height(); - - for (int y = 0; y < h; ++y) { - QRgb *ls = (QRgb *)scaledImage.scanLine( y ); - for (int x = 0; x < w; ++x) { - QRgb l = ls[x]; - float alpha_adjust = (tqAlpha( l )/256.0); - int r = int( tqRed( l ) * alpha_adjust ); - int g = int( tqGreen( l ) * alpha_adjust ); - int b = int( tqBlue( l ) * alpha_adjust ); - int a = int( tqAlpha( l ) * 1 ); - ls[x] = tqRgba( r, g, b, a ); - } + if (!scaledImage.isNull()) { + scaledImage = KImageEffect::convertToPremultipliedAlpha(scaledImage); } } |