-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 8e3a365..b0ec673 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp @@ -191,3 +191,3 @@ void VideoWidget::resizeEvent( QResizeEvent * ) { slider->setFixedWidth( w - 20 ); - slider->setGeometry( QRect( 15, h - 30, w - 90, 20 ) ); + slider->setGeometry( QRect( 15, h - 22, w - 90, 20 ) ); slider->setBackgroundOrigin( QWidget::ParentOrigin ); @@ -197,3 +197,6 @@ void VideoWidget::resizeEvent( QResizeEvent * ) { xoff = 0;// ( imgUp->width() ) / 2; - yoff = 185;//(( Vh - imgUp->height() ) / 2) - 10; + if(w>h) + yoff = 0; + else + yoff = 185;//(( Vh - imgUp->height() ) / 2) - 10; QPoint p( xoff, yoff ); @@ -397,3 +400,13 @@ void VideoWidget::makeVisible() { } - videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); + + QWidget *d = QApplication::desktop(); + int w=d->width(); + int h=d->height(); + + if(w>h) { + int newW=(w/2)-(246/2); //this will only work with 320x240 + videoFrame->setGeometry( QRect( newW, 4, 240, 170 ) ); + } else + videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); + qApp->processEvents(); |