summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp
index 865ff91..70ef8d9 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.cpp
+++ b/noncore/multimedia/opieplayer2/mediawidget.cpp
@@ -72,11 +72,10 @@ MediaWidget::Button MediaWidget::setupButton( const SkinButtonInfo &buttonInfo,
72 72
73QBitmap MediaWidget::setupButtonMask( const Command &command, const QString &fileName ) 73QBitmap MediaWidget::setupButtonMask( const Command &command, const QString &fileName )
74{ 74{
75 QBitmap mask( Resource::findPixmap( fileName ) ); 75 QImage imgMask( Resource::findPixmap( fileName ) );
76 if ( mask.isNull() ) 76 if ( imgMask.isNull() )
77 return mask; 77 return QBitmap();
78 78
79 QImage imgMask = mask.convertToImage();
80 uchar **dest = buttonMask.jumpTable(); 79 uchar **dest = buttonMask.jumpTable();
81 for ( int y = 0; y < buttonMask.height(); y++ ) { 80 for ( int y = 0; y < buttonMask.height(); y++ ) {
82 uchar *line = dest[y]; 81 uchar *line = dest[y];
@@ -85,7 +84,9 @@ QBitmap MediaWidget::setupButtonMask( const Command &command, const QString &fil
85 line[x] = command + 1; 84 line[x] = command + 1;
86 } 85 }
87 86
88 return mask; 87 // ### grmbl qt2. use constructor when switching to qt3.
88 QBitmap bm; bm = imgMask;
89 return bm;
89} 90}
90 91
91void MediaWidget::loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix ) 92void MediaWidget::loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &fileNameInfix )