summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp22
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h2
2 files changed, 10 insertions, 14 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 7d85d63..089ef6a 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -101,9 +101,11 @@ VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
for ( int i = 0; i < 7; i++ ) {
+ Button &button = buttons[ i ];
+
QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png" );
- masks[i] = new QBitmap( filename );
+ button.mask = QBitmap( filename );
- if ( !masks[i]->isNull() ) {
- QImage imgMask = masks[i]->convertToImage();
+ if ( !button.mask.isNull() ) {
+ QImage imgMask = button.mask.convertToImage();
uchar **dest = buttonMask.jumpTable();
for ( int y = 0; y < imgUp.height(); y++ ) {
@@ -140,14 +142,8 @@ VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
VideoWidget::~VideoWidget() {
-
for ( int i = 0; i < 7; i++ ) {
delete buttonPixUp[i];
delete buttonPixDown[i];
}
-
- for ( int i = 0; i < 7; i++ ) {
- delete masks[i];
- }
-
}
@@ -189,9 +185,11 @@ void VideoWidget::resizeEvent( QResizeEvent * ) {
for ( int i = 0; i < 7; i++ ) {
- if ( !masks[i]->isNull() ) {
+ Button &button = buttons[ i ];
+
+ if ( !button.mask.isNull() ) {
delete buttonPixUp[i];
delete buttonPixDown[i];
- buttonPixUp[i] = maskVPixToMask( *pixUp, *masks[i] );
- buttonPixDown[i] = maskVPixToMask( *pixDn, *masks[i] );
+ buttonPixUp[i] = maskVPixToMask( *pixUp, button.mask );
+ buttonPixDown[i] = maskVPixToMask( *pixDn, button.mask );
}
}
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h
index cb6171c..fd301f9 100644
--- a/noncore/multimedia/opieplayer2/videowidget.h
+++ b/noncore/multimedia/opieplayer2/videowidget.h
@@ -101,9 +101,7 @@ private:
QImage imgUp;
QImage imgDn;
- QBitmap *masks[7];
QPixmap *buttonPixUp[7];
QPixmap *buttonPixDown[7];
QString skin;
-// QPixmap *pixmaps[4];