-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 8fe572f..238770b 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp @@ -96,17 +96,17 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) ); imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); imgButtonMask->fill( 0 ); for ( int i = 0; i < 7; i++ ) { QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png"; masks[i] = new QBitmap( filename ); - qDebug(filename); + if ( !masks[i]->isNull() ) { QImage imgMask = masks[i]->convertToImage(); uchar **dest = imgButtonMask->jumpTable(); for ( int y = 0; y < imgUp->height(); y++ ) { uchar *line = dest[y]; for ( int x = 0; x < imgUp->width(); x++ ) { if ( !qRed( imgMask.pixel( x, y ) ) ) line[x] = i + 1; @@ -174,32 +174,28 @@ QPixmap *maskVPixToMask( QPixmap pix, QBitmap mask ) { pixmap->setMask( mask ); return pixmap; } void VideoWidget::resizeEvent( QResizeEvent * ) { int h = height(); int w = width(); int Vh = 160; - //videoFrame->height(); int Vw = 220; - //videoFrame->width(); - slider->setFixedWidth( w - 20 ); slider->setGeometry( QRect( 15, h - 30, w - 90, 20 ) ); slider->setBackgroundOrigin( QWidget::ParentOrigin ); slider->setFocusPolicy( QWidget::NoFocus ); slider->setBackgroundPixmap( *pixBg ); xoff = 0;// ( imgUp->width() ) / 2; - yoff = 180;//(( Vh - imgUp->height() ) / 2) - 10; + yoff = 185;//(( Vh - imgUp->height() ) / 2) - 10; QPoint p( xoff, yoff ); - QPixmap *pixUp = combineVImageWithBackground( *imgUp, *pixBg, p ); QPixmap *pixDn = combineVImageWithBackground( *imgDn, *pixBg, p ); for ( int i = 0; i < 7; i++ ) { if ( !masks[i]->isNull() ) { delete buttonPixUp[i]; delete buttonPixDown[i]; buttonPixUp[i] = maskVPixToMask( *pixUp, *masks[i] ); @@ -454,24 +450,24 @@ void VideoWidget::keyReleaseEvent( QKeyEvent *e) { mediaPlayerState->setPlaying(FALSE); } else { mediaPlayerState->setPlaying(TRUE); } } break; case Key_Down: // toggleButton(6); -// emit lessClicked(); -// emit lessReleased(); + emit lessClicked(); + emit lessReleased(); // toggleButton(6); break; case Key_Up: // toggleButton(5); -// emit moreClicked(); -// emit moreReleased(); + emit moreClicked(); + emit moreReleased(); // toggleButton(5); break; case Key_Right: mediaPlayerState->setNext(); break; case Key_Left: mediaPlayerState->setPrev(); break; |