summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-09 14:41:19 (UTC)
committer simon <simon>2002-12-09 14:41:19 (UTC)
commit174c4a427750a3829ffd81a87454be8abf61ee30 (patch) (unidiff)
treee6b8d73afe4426707698396cc3c0086d712983f9
parent3f88070b9be5209cdd88caa0afd7f7294d3b1764 (diff)
downloadopie-174c4a427750a3829ffd81a87454be8abf61ee30.zip
opie-174c4a427750a3829ffd81a87454be8abf61ee30.tar.gz
opie-174c4a427750a3829ffd81a87454be8abf61ee30.tar.bz2
- merged the two button setup loops
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 87e06ee..c148820 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -86,12 +86,6 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
86 MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ), 86 MediaWidget( playList, mediaPlayerState, parent, name ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ),
87 audioSliderBeingMoved( false ) 87 audioSliderBeingMoved( false )
88{ 88{
89 for ( uint i = 0; i < buttonCount; ++i ) {
90 Button button;
91 button.type = skinInfo[ i ].type;
92 buttons.push_back( button );
93 }
94
95 setCaption( tr("OpiePlayer") ); 89 setCaption( tr("OpiePlayer") );
96 90
97 Config cfg("OpiePlayer"); 91 Config cfg("OpiePlayer");
@@ -108,12 +102,15 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
108 buttonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 ); 102 buttonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 );
109 buttonMask.fill( 0 ); 103 buttonMask.fill( 0 );
110 104
111 for ( uint i = 0; i < buttons.size(); i++ ) { 105 for ( uint i = 0; i < buttonCount; i++ ) {
106 Button button;
107 button.type = skinInfo[ i ].type;
108
112 QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_" + skinInfo[i].fileName + ".png" ); 109 QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_" + skinInfo[i].fileName + ".png" );
113 buttons[ i ].mask =QBitmap( filename ); 110 button.mask =QBitmap( filename );
114 111
115 if ( !buttons[i].mask.isNull() ) { 112 if ( !button.mask.isNull() ) {
116 QImage imgMask = buttons[i].mask.convertToImage(); 113 QImage imgMask = button.mask.convertToImage();
117 uchar **dest = buttonMask.jumpTable(); 114 uchar **dest = buttonMask.jumpTable();
118 for ( int y = 0; y < imgUp.height(); y++ ) { 115 for ( int y = 0; y < imgUp.height(); y++ ) {
119 uchar *line = dest[y]; 116 uchar *line = dest[y];
@@ -123,6 +120,7 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
123 } 120 }
124 } 121 }
125 122
123 buttons.push_back( button );
126 } 124 }
127 125
128 setBackgroundPixmap( pixBg ); 126 setBackgroundPixmap( pixBg );