Diffstat (limited to 'noncore/multimedia/opieplayer2/audiowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/audiowidget.cpp | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp index 23d12ec..fd18dbb 100644 --- a/noncore/multimedia/opieplayer2/audiowidget.cpp +++ b/noncore/multimedia/opieplayer2/audiowidget.cpp | |||
@@ -100,28 +100,5 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye | |||
100 | imgDn = QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); | 100 | imgDn = QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); |
101 | 101 | ||
102 | buttonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 ); | 102 | setupButtons( skinInfo, buttonCount, QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_", imgUp.size() ); |
103 | buttonMask.fill( 0 ); | ||
104 | |||
105 | for ( uint i = 0; i < buttonCount; i++ ) { | ||
106 | Button button; | ||
107 | button.command = skinInfo[ i ].command; | ||
108 | button.type = skinInfo[ i ].type; | ||
109 | |||
110 | QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_" + skinInfo[i].fileName + ".png" ); | ||
111 | button.mask =QBitmap( filename ); | ||
112 | |||
113 | if ( !button.mask.isNull() ) { | ||
114 | QImage imgMask = button.mask.convertToImage(); | ||
115 | uchar **dest = buttonMask.jumpTable(); | ||
116 | for ( int y = 0; y < imgUp.height(); y++ ) { | ||
117 | uchar *line = dest[y]; | ||
118 | for ( int x = 0; x < imgUp.width(); x++ ) | ||
119 | if ( !qRed( imgMask.pixel( x, y ) ) ) | ||
120 | line[x] = button.command + 1; | ||
121 | } | ||
122 | } | ||
123 | |||
124 | buttons.push_back( button ); | ||
125 | } | ||
126 | 103 | ||
127 | setBackgroundPixmap( backgroundPixmap ); | 104 | setBackgroundPixmap( backgroundPixmap ); |