summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-09-19 19:45:49 (UTC)
committer llornkcor <llornkcor>2002-09-19 19:45:49 (UTC)
commit2e0cb5c85f913141985df4e7f2514817851420fb (patch) (side-by-side diff)
treee58f576310994d1bb813143cb96b312af37b78fb
parentaef34909dcfb2ffb637c9d3693e395c15b255cb2 (diff)
downloadopie-2e0cb5c85f913141985df4e7f2514817851420fb.zip
opie-2e0cb5c85f913141985df4e7f2514817851420fb.tar.gz
opie-2e0cb5c85f913141985df4e7f2514817851420fb.tar.bz2
tweak for landscape mode
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp15
1 files changed, 14 insertions, 1 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
@@ -189,12 +189,15 @@ void VideoWidget::resizeEvent( QResizeEvent * ) {
//int Vw = 220;
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 );
slider->setFocusPolicy( QWidget::NoFocus );
slider->setBackgroundPixmap( *pixBg );
xoff = 0;// ( imgUp->width() ) / 2;
+ if(w>h)
+ yoff = 0;
+ else
yoff = 185;//(( Vh - imgUp->height() ) / 2) - 10;
QPoint p( xoff, yoff );
@@ -395,7 +398,17 @@ void VideoWidget::makeVisible() {
connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
}
+
+ 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();
}
}