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 | |||
@@ -96,36 +96,13 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye | |||
96 | 96 | ||
97 | QString skinPath = "opieplayer2/skins/" + skin; | 97 | QString skinPath = "opieplayer2/skins/" + skin; |
98 | backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); | 98 | backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); |
99 | imgUp = QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); | 99 | imgUp = QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); |
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 ); |
128 | 105 | ||
129 | songInfo.setFocusPolicy( QWidget::NoFocus ); | 106 | songInfo.setFocusPolicy( QWidget::NoFocus ); |
130 | // changeTextColor( &songInfo ); | 107 | // changeTextColor( &songInfo ); |
131 | // songInfo.setBackgroundColor( QColor( 167, 212, 167 )); | 108 | // songInfo.setBackgroundColor( QColor( 167, 212, 167 )); |