summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show 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
@@ -141,10 +141,10 @@ void AudioWidget::resizeEvent( QResizeEvent * ) {
time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) );
- upperLeftOfButtonMask.rx() = ( w - imgUp.width() ) / 2;
- upperLeftOfButtonMask.ry() = (( h - imgUp.height() ) / 2) - 10;
+ upperLeftOfButtonMask.rx() = ( w - buttonUpImage.width() ) / 2;
+ upperLeftOfButtonMask.ry() = (( h - buttonUpImage.height() ) / 2) - 10;
QPoint p = upperLeftOfButtonMask;
- QPixmap pixUp = combineImageWithBackground( imgUp, backgroundPixmap, p );
- QPixmap pixDn = combineImageWithBackground( imgDn, backgroundPixmap, p );
+ QPixmap pixUp = combineImageWithBackground( buttonUpImage, backgroundPixmap, p );
+ QPixmap pixDn = combineImageWithBackground( buttonDownImage, backgroundPixmap, p );
for ( uint i = 0; i < buttons.size(); i++ ) {
@@ -201,8 +201,8 @@ void AudioWidget::loadSkin()
QString skinPath = "opieplayer2/skins/" + skin;
backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
- imgUp = QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) );
- imgDn = QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) );
+ buttonUpImage = QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) );
+ buttonDownImage = QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) );
- setupButtons( skinInfo, buttonCount, QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_", imgUp.size() );
+ setupButtons( skinInfo, buttonCount, QPEApplication::qpeDir() + "/pics/" + skinPath + "/skin_mask_", buttonUpImage.size() );
setBackgroundPixmap( backgroundPixmap );
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
@@ -87,6 +87,4 @@ private:
int skipDirection;
QString skin;
- QImage imgUp;
- QImage imgDn;
OTicker songInfo;
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
@@ -138,4 +138,6 @@ protected:
QPixmap backgroundPixmap;
+ QImage buttonUpImage;
+ QImage buttonDownImage;
};
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
@@ -133,6 +133,6 @@ void VideoWidget::resizeEvent( QResizeEvent * ) {
QPoint p = upperLeftOfButtonMask;
- QPixmap *pixUp = combineVImageWithBackground( imgUp, backgroundPixmap, p );
- QPixmap *pixDn = combineVImageWithBackground( imgDn, backgroundPixmap, p );
+ QPixmap *pixUp = combineVImageWithBackground( buttonUpImage, backgroundPixmap, p );
+ QPixmap *pixDn = combineVImageWithBackground( buttonDownImage, backgroundPixmap, p );
for ( ButtonVector::iterator it = buttons.begin(); it != buttons.end(); ++it ) {
@@ -188,12 +188,12 @@ void VideoWidget::loadSkin()
Config cfg("OpiePlayer");
cfg.setGroup("Options");
- skin = cfg.readEntry("Skin","default");
+ QString skin = cfg.readEntry("Skin","default");
QString skinPath = "opieplayer2/skins/" + skin;
backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
- imgUp = QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) );
- imgDn = QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) );
+ buttonUpImage = QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) );
+ buttonDownImage = QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) );
- setupButtons( skinInfo, buttonCount, QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_", imgUp.size() );
+ setupButtons( skinInfo, buttonCount, QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_", buttonUpImage.size() );
setBackgroundPixmap( backgroundPixmap );
@@ -203,5 +203,5 @@ void VideoWidget::loadSkin()
slider->setMinValue( 0 );
slider->setMaxValue( 1 );
- slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) );
+ slider->setBackgroundPixmap( backgroundPixmap );
//slider->setFocusPolicy( QWidget::NoFocus );
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
@@ -83,11 +83,5 @@ protected:
private:
// Ticker songInfo;
- QImage imgUp;
- QImage imgDn;
- QString skin;
-
-
- QString backgroundPix;
QSlider *slider;
QImage *currentFrame;