From f52b2b2da08a74b5bdbaf1f8b7f460c46ad9c177 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Sun, 14 Jun 2009 15:03:19 +0200 Subject: [PATCH] Qt: Fullscreen Controller, show with full opacity when mouseChanged. --- modules/gui/qt4/components/controller.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp index bd85054006..64e0955d24 100644 --- a/modules/gui/qt4/components/controller.cpp +++ b/modules/gui/qt4/components/controller.cpp @@ -757,13 +757,14 @@ void FullscreenControllerWidget::showFSC() screenRes != QApplication::desktop()->screenGeometry(number) ) { centerFSC( number ); + msg_Dbg( p_intf, "Recentering the Fullscreen Controller" ); } - show(); - #if HAVE_TRANSPARENCY setWindowOpacity( DEFAULT_OPACITY ); #endif + + show(); } /** @@ -836,10 +837,12 @@ void FullscreenControllerWidget::customEvent( QEvent *event ) switch( event->type() ) { + /* This is used when the 'i' hotkey is used, to force quick toggle */ case FullscreenControlToggle_Type: vlc_mutex_lock( &lock ); b_fs = b_fullscreen; vlc_mutex_unlock( &lock ); + if( b_fs ) { if( isHidden() ) @@ -851,21 +854,25 @@ void FullscreenControllerWidget::customEvent( QEvent *event ) hideFSC(); } break; + /* Event called to Show the FSC on mouseChanged() */ case FullscreenControlShow_Type: vlc_mutex_lock( &lock ); b_fs = b_fullscreen; vlc_mutex_unlock( &lock ); - if( b_fs && !isVisible() ) + if( b_fs ) showFSC(); + break; - case FullscreenControlHide_Type: - hideFSC(); - break; + /* Start the timer to hide later, called usually with above case */ case FullscreenControlPlanHide_Type: if( !b_mouse_over ) // Only if the mouse is not over FSC planHideFSC(); break; + /* Hide */ + case FullscreenControlHide_Type: + hideFSC(); + break; default: break; } -- 2.39.2