author | simon <simon> | 2002-12-11 18:12:49 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-11 18:12:49 (UTC) |
commit | d9a6575f931b288086da701c3094b475c73d2efc (patch) (unidiff) | |
tree | 652c2d51610750cc06de2e9e2c7690e1f347c886 | |
parent | f4865ac8e114baedd13c95160631e4574da9dc84 (diff) | |
download | opie-d9a6575f931b288086da701c3094b475c73d2efc.zip opie-d9a6575f931b288086da701c3094b475c73d2efc.tar.gz opie-d9a6575f931b288086da701c3094b475c73d2efc.tar.bz2 |
- set the correct status on the fullscreen toggle button when returning
from fullscreen mode
-rw-r--r-- | noncore/multimedia/opieplayer2/videowidget.cpp | 1 |
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 | |||
@@ -183,48 +183,49 @@ void VideoWidget::updateSlider( long i, long max ) { | |||
183 | } | 183 | } |
184 | int width = slider->width(); | 184 | int width = slider->width(); |
185 | int val = int((double)i * width / max); | 185 | int val = int((double)i * width / max); |
186 | if ( !mediaPlayerState.isFullscreen() && !videoSliderBeingMoved ) { | 186 | if ( !mediaPlayerState.isFullscreen() && !videoSliderBeingMoved ) { |
187 | if ( slider->value() != val ) { | 187 | if ( slider->value() != val ) { |
188 | slider->setValue( val ); | 188 | slider->setValue( val ); |
189 | } | 189 | } |
190 | if ( slider->maxValue() != width ) { | 190 | if ( slider->maxValue() != width ) { |
191 | slider->setMaxValue( width ); | 191 | slider->setMaxValue( width ); |
192 | } | 192 | } |
193 | } | 193 | } |
194 | } | 194 | } |
195 | 195 | ||
196 | void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { | 196 | void VideoWidget::mouseReleaseEvent( QMouseEvent *event ) { |
197 | if ( mediaPlayerState.isFullscreen() ) { | 197 | if ( mediaPlayerState.isFullscreen() ) { |
198 | mediaPlayerState.setFullscreen( FALSE ); | 198 | mediaPlayerState.setFullscreen( FALSE ); |
199 | makeVisible(); | 199 | makeVisible(); |
200 | } | 200 | } |
201 | MediaWidget::mouseReleaseEvent( event ); | 201 | MediaWidget::mouseReleaseEvent( event ); |
202 | } | 202 | } |
203 | 203 | ||
204 | void VideoWidget::backToNormal() { | 204 | void VideoWidget::backToNormal() { |
205 | mediaPlayerState.setFullscreen( FALSE ); | 205 | mediaPlayerState.setFullscreen( FALSE ); |
206 | makeVisible(); | 206 | makeVisible(); |
207 | setToggleButton( FullScreen, false ); | ||
207 | } | 208 | } |
208 | 209 | ||
209 | void VideoWidget::makeVisible() { | 210 | void VideoWidget::makeVisible() { |
210 | if ( mediaPlayerState.isFullscreen() ) { | 211 | if ( mediaPlayerState.isFullscreen() ) { |
211 | setBackgroundMode( QWidget::NoBackground ); | 212 | setBackgroundMode( QWidget::NoBackground ); |
212 | showFullScreen(); | 213 | showFullScreen(); |
213 | resize( qApp->desktop()->size() ); | 214 | resize( qApp->desktop()->size() ); |
214 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); | 215 | videoFrame-> setGeometry ( 0, 0, width ( ), height ( )); |
215 | 216 | ||
216 | slider->hide(); | 217 | slider->hide(); |
217 | disconnect( &mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); | 218 | disconnect( &mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); |
218 | disconnect( &mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); | 219 | disconnect( &mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); |
219 | disconnect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); | 220 | disconnect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); |
220 | disconnect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); | 221 | disconnect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); |
221 | 222 | ||
222 | } else { | 223 | } else { |
223 | showNormal(); | 224 | showNormal(); |
224 | showMaximized(); | 225 | showMaximized(); |
225 | setBackgroundPixmap( backgroundPixmap ); | 226 | setBackgroundPixmap( backgroundPixmap ); |
226 | QWidget *d = QApplication::desktop(); | 227 | QWidget *d = QApplication::desktop(); |
227 | int w = d->width(); | 228 | int w = d->width(); |
228 | int h = d->height(); | 229 | int h = d->height(); |
229 | 230 | ||
230 | if(w>h) { | 231 | if(w>h) { |