summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp14
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h2
-rw-r--r--noncore/multimedia/opieplayer2/mediawidget.h2
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp14
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h6
5 files changed, 16 insertions, 22 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 0516089..0b7cc45 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -140,12 +140,12 @@ void AudioWidget::resizeEvent( QResizeEvent * ) {
140 slider.setBackgroundOrigin( QWidget::ParentOrigin ); 140 slider.setBackgroundOrigin( QWidget::ParentOrigin );
141 time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) ); 141 time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) );
142 142
143 upperLeftOfButtonMask.rx() = ( w - imgUp.width() ) / 2; 143 upperLeftOfButtonMask.rx() = ( w - buttonUpImage.width() ) / 2;
144 upperLeftOfButtonMask.ry() = (( h - imgUp.height() ) / 2) - 10; 144 upperLeftOfButtonMask.ry() = (( h - buttonUpImage.height() ) / 2) - 10;
145 QPoint p = upperLeftOfButtonMask; 145 QPoint p = upperLeftOfButtonMask;
146 146
147 QPixmap pixUp = combineImageWithBackground( imgUp, backgroundPixmap, p ); 147 QPixmap pixUp = combineImageWithBackground( buttonUpImage, backgroundPixmap, p );
148 QPixmap pixDn = combineImageWithBackground( imgDn, backgroundPixmap, p ); 148 QPixmap pixDn = combineImageWithBackground( buttonDownImage, backgroundPixmap, p );
149 149
150 for ( uint i = 0; i < buttons.size(); i++ ) { 150 for ( uint i = 0; i < buttons.size(); i++ ) {
151 if ( !buttons[i].mask.isNull() ) { 151 if ( !buttons[i].mask.isNull() ) {
@@ -200,10 +200,10 @@ void AudioWidget::loadSkin()
200 200
201 QString skinPath = "opieplayer2/skins/" + skin; 201 QString skinPath = "opieplayer2/skins/" + skin;
202 backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); 202 backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
203 imgUp = QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); 203 buttonUpImage = QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) );
204 imgDn = QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); 204 buttonDownImage = QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) );
205 205
206 setupButtons( skinInfo, buttonCount, QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_", imgUp.size() ); 206 setupButtons( skinInfo, buttonCount, QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_", buttonUpImage.size() );
207 207
208 setBackgroundPixmap( backgroundPixmap ); 208 setBackgroundPixmap( backgroundPixmap );
209 209
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index 61556c6..670fb45 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -86,8 +86,6 @@ private slots:
86private: 86private:
87 int skipDirection; 87 int skipDirection;
88 QString skin; 88 QString skin;
89 QImage imgUp;
90 QImage imgDn;
91 89
92 OTicker songInfo; 90 OTicker songInfo;
93 QSlider slider; 91 QSlider slider;
diff --git a/noncore/multimedia/opieplayer2/mediawidget.h b/noncore/multimedia/opieplayer2/mediawidget.h
index a9dddf8..754228e 100644
--- a/noncore/multimedia/opieplayer2/mediawidget.h
+++ b/noncore/multimedia/opieplayer2/mediawidget.h
@@ -137,6 +137,8 @@ protected:
137 QPoint upperLeftOfButtonMask; 137 QPoint upperLeftOfButtonMask;
138 138
139 QPixmap backgroundPixmap; 139 QPixmap backgroundPixmap;
140 QImage buttonUpImage;
141 QImage buttonDownImage;
140}; 142};
141 143
142#endif // MEDIAWIDGET_H 144#endif // MEDIAWIDGET_H
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index a03d43e..0047ac0 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -132,8 +132,8 @@ void VideoWidget::resizeEvent( QResizeEvent * ) {
132 upperLeftOfButtonMask.ry() = 185;//(( Vh - imgUp->height() ) / 2) - 10; 132 upperLeftOfButtonMask.ry() = 185;//(( Vh - imgUp->height() ) / 2) - 10;
133 QPoint p = upperLeftOfButtonMask; 133 QPoint p = upperLeftOfButtonMask;
134 134
135 QPixmap *pixUp = combineVImageWithBackground( imgUp, backgroundPixmap, p ); 135 QPixmap *pixUp = combineVImageWithBackground( buttonUpImage, backgroundPixmap, p );
136 QPixmap *pixDn = combineVImageWithBackground( imgDn, backgroundPixmap, p ); 136 QPixmap *pixDn = combineVImageWithBackground( buttonDownImage, backgroundPixmap, p );
137 137
138 for ( ButtonVector::iterator it = buttons.begin(); it != buttons.end(); ++it ) { 138 for ( ButtonVector::iterator it = buttons.begin(); it != buttons.end(); ++it ) {
139 Button &button = *it; 139 Button &button = *it;
@@ -187,14 +187,14 @@ void VideoWidget::loadSkin()
187{ 187{
188 Config cfg("OpiePlayer"); 188 Config cfg("OpiePlayer");
189 cfg.setGroup("Options"); 189 cfg.setGroup("Options");
190 skin = cfg.readEntry("Skin","default"); 190 QString skin = cfg.readEntry("Skin","default");
191 191
192 QString skinPath = "opieplayer2/skins/" + skin; 192 QString skinPath = "opieplayer2/skins/" + skin;
193 backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); 193 backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
194 imgUp = QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); 194 buttonUpImage = QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) );
195 imgDn = QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); 195 buttonDownImage = QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) );
196 196
197 setupButtons( skinInfo, buttonCount, QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_", imgUp.size() ); 197 setupButtons( skinInfo, buttonCount, QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_", buttonUpImage.size() );
198 198
199 setBackgroundPixmap( backgroundPixmap ); 199 setBackgroundPixmap( backgroundPixmap );
200 200
@@ -202,7 +202,7 @@ void VideoWidget::loadSkin()
202 slider = new QSlider( Qt::Horizontal, this ); 202 slider = new QSlider( Qt::Horizontal, this );
203 slider->setMinValue( 0 ); 203 slider->setMinValue( 0 );
204 slider->setMaxValue( 1 ); 204 slider->setMaxValue( 1 );
205 slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); 205 slider->setBackgroundPixmap( backgroundPixmap );
206 //slider->setFocusPolicy( QWidget::NoFocus ); 206 //slider->setFocusPolicy( QWidget::NoFocus );
207 207
208 resizeEvent( 0 ); 208 resizeEvent( 0 );
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h
index 87be371..f434945 100644
--- a/noncore/multimedia/opieplayer2/videowidget.h
+++ b/noncore/multimedia/opieplayer2/videowidget.h
@@ -82,13 +82,7 @@ protected:
82 82
83private: 83private:
84// Ticker songInfo; 84// Ticker songInfo;
85 QImage imgUp;
86 QImage imgDn;
87 QString skin;
88 85
89
90
91 QString backgroundPix;
92 QSlider *slider; 86 QSlider *slider;
93 QImage *currentFrame; 87 QImage *currentFrame;
94 int scaledWidth; 88 int scaledWidth;