summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-11 18:12:49 (UTC)
committer simon <simon>2002-12-11 18:12:49 (UTC)
commitd9a6575f931b288086da701c3094b475c73d2efc (patch) (side-by-side diff)
tree652c2d51610750cc06de2e9e2c7690e1f347c886
parentf4865ac8e114baedd13c95160631e4574da9dc84 (diff)
downloadopie-d9a6575f931b288086da701c3094b475c73d2efc.zip
opie-d9a6575f931b288086da701c3094b475c73d2efc.tar.gz
opie-d9a6575f931b288086da701c3094b475c73d2efc.tar.bz2
- set the correct status on the fullscreen toggle button when returning
from fullscreen mode
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 2a345e3..2300630 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -175,64 +175,65 @@ void VideoWidget::loadSkin()
resizeEvent( 0 );
}
void VideoWidget::updateSlider( long i, long max ) {
// Will flicker too much if we don't do this
if ( max == 0 ) {
return;
}
int width = slider->width();
int val = int((double)i * width / max);
if ( !mediaPlayerState.isFullscreen() && !videoSliderBeingMoved ) {
if ( slider->value() != val ) {
slider->setValue( val );
}
if ( slider->maxValue() != width ) {
slider->setMaxValue( width );
}
}
}
void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) {
if ( mediaPlayerState.isFullscreen() ) {
mediaPlayerState.setFullscreen( FALSE );
makeVisible();
}
MediaWidget::mouseReleaseEvent( event );
}
void VideoWidget::backToNormal() {
mediaPlayerState.setFullscreen( FALSE );
makeVisible();
+ setToggleButton( FullScreen, false );
}
void VideoWidget::makeVisible() {
if ( mediaPlayerState.isFullscreen() ) {
setBackgroundMode( QWidget::NoBackground );
showFullScreen();
resize( qApp->desktop()->size() );
videoFrame-> setGeometry ( 0, 0, width ( ), height ( ));
slider->hide();
disconnect( &mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
disconnect( &mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
disconnect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
disconnect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
} else {
showNormal();
showMaximized();
setBackgroundPixmap( backgroundPixmap );
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 ) );
}
if ( !mediaPlayerState.isSeekable() ) {
if( !slider->isHidden()) {