-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 | |||
@@ -190,5 +190,5 @@ void VideoWidget::resizeEvent( QResizeEvent * ) { | |||
190 | 190 | ||
191 | slider->setFixedWidth( w - 20 ); | 191 | slider->setFixedWidth( w - 20 ); |
192 | slider->setGeometry( QRect( 15, h - 30, w - 90, 20 ) ); | 192 | slider->setGeometry( QRect( 15, h - 22, w - 90, 20 ) ); |
193 | slider->setBackgroundOrigin( QWidget::ParentOrigin ); | 193 | slider->setBackgroundOrigin( QWidget::ParentOrigin ); |
194 | slider->setFocusPolicy( QWidget::NoFocus ); | 194 | slider->setFocusPolicy( QWidget::NoFocus ); |
@@ -196,5 +196,8 @@ void VideoWidget::resizeEvent( QResizeEvent * ) { | |||
196 | 196 | ||
197 | xoff = 0;// ( imgUp->width() ) / 2; | 197 | xoff = 0;// ( imgUp->width() ) / 2; |
198 | yoff = 185;//(( Vh - imgUp->height() ) / 2) - 10; | 198 | if(w>h) |
199 | yoff = 0; | ||
200 | else | ||
201 | yoff = 185;//(( Vh - imgUp->height() ) / 2) - 10; | ||
199 | QPoint p( xoff, yoff ); | 202 | QPoint p( xoff, yoff ); |
200 | 203 | ||
@@ -396,5 +399,15 @@ void VideoWidget::makeVisible() { | |||
396 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 399 | connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
397 | } | 400 | } |
398 | videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); | 401 | |
402 | QWidget *d = QApplication::desktop(); | ||
403 | int w=d->width(); | ||
404 | int h=d->height(); | ||
405 | |||
406 | if(w>h) { | ||
407 | int newW=(w/2)-(246/2); //this will only work with 320x240 | ||
408 | videoFrame->setGeometry( QRect( newW, 4, 240, 170 ) ); | ||
409 | } else | ||
410 | videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) ); | ||
411 | |||
399 | qApp->processEvents(); | 412 | qApp->processEvents(); |
400 | } | 413 | } |