summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/videowidget.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 7838229..459f592 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -96,22 +96,22 @@ VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
96 96
97 QString skinPath = "opieplayer2/skins/" + skin; 97 QString skinPath = "opieplayer2/skins/" + skin;
98 pixBg = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); 98 pixBg = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
99 imgUp = QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) ); 99 imgUp = QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) );
100 imgDn = QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); 100 imgDn = QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) );
101 101
102 imgButtonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 ); 102 buttonMask = QImage( imgUp.width(), imgUp.height(), 8, 255 );
103 imgButtonMask.fill( 0 ); 103 buttonMask.fill( 0 );
104 104
105 for ( int i = 0; i < 7; i++ ) { 105 for ( int i = 0; i < 7; i++ ) {
106 QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png" ); 106 QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png" );
107 masks[i] = new QBitmap( filename ); 107 masks[i] = new QBitmap( filename );
108 108
109 if ( !masks[i]->isNull() ) { 109 if ( !masks[i]->isNull() ) {
110 QImage imgMask = masks[i]->convertToImage(); 110 QImage imgMask = masks[i]->convertToImage();
111 uchar **dest = imgButtonMask.jumpTable(); 111 uchar **dest = buttonMask.jumpTable();
112 for ( int y = 0; y < imgUp.height(); y++ ) { 112 for ( int y = 0; y < imgUp.height(); y++ ) {
113 uchar *line = dest[y]; 113 uchar *line = dest[y];
114 for ( int x = 0; x < imgUp.width(); x++ ) { 114 for ( int x = 0; x < imgUp.width(); x++ ) {
115 if ( !qRed( imgMask.pixel( x, y ) ) ) 115 if ( !qRed( imgMask.pixel( x, y ) ) )
116 line[x] = i + 1; 116 line[x] = i + 1;
117 } 117 }
@@ -282,15 +282,15 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
282 for ( unsigned int i = 0; i < buttons.size(); i++ ) { 282 for ( unsigned int i = 0; i < buttons.size(); i++ ) {
283 if ( event->state() == QMouseEvent::LeftButton ) { 283 if ( event->state() == QMouseEvent::LeftButton ) {
284 // The test to see if the mouse click is inside the button or not 284 // The test to see if the mouse click is inside the button or not
285 int x = event->pos().x() - xoff; 285 int x = event->pos().x() - xoff;
286 int y = event->pos().y() - yoff; 286 int y = event->pos().y() - yoff;
287 287
288 bool isOnButton = ( x > 0 && y > 0 && x < imgButtonMask.width() 288 bool isOnButton = ( x > 0 && y > 0 && x < buttonMask.width()
289 && y < imgButtonMask.height() 289 && y < buttonMask.height()
290 && imgButtonMask.pixelIndex( x, y ) == i + 1 ); 290 && buttonMask.pixelIndex( x, y ) == i + 1 );
291 291
292 if ( isOnButton && !buttons[i].isHeld ) { 292 if ( isOnButton && !buttons[i].isHeld ) {
293 buttons[i].isHeld = TRUE; 293 buttons[i].isHeld = TRUE;
294 toggleButton(i); 294 toggleButton(i);
295 295
296 switch (i) { 296 switch (i) {