vlc | branch: master | Erwan Tulou <[email protected]> | Wed Jun 27 10:54:40 2012 +0200| [735354e7ab2985aab800486130ab66c64f2cbd1e] | committer: Erwan Tulou
skins2: parametrize how long fullscreen controller stays on screen Use the mouse-hide-timeout parameter for that purpose, as the other interfaces do in vlc. this fixes #7017 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=735354e7ab2985aab800486130ab66c64f2cbd1e --- modules/gui/skins2/src/fsc_window.cpp | 13 +++++++++---- modules/gui/skins2/src/fsc_window.hpp | 2 ++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/gui/skins2/src/fsc_window.cpp b/modules/gui/skins2/src/fsc_window.cpp index ed368af..e8eb60b 100644 --- a/modules/gui/skins2/src/fsc_window.cpp +++ b/modules/gui/skins2/src/fsc_window.cpp @@ -28,7 +28,7 @@ /** * Fading out is computed in the following way: - * - a timer is fired with a given period (FSC_DELAY) + * - a timer is fired with a given period (m_delay) * - a total of FSC_COUNT transitions are processed before * hiding the controller * - transparency is changed in the following way : @@ -57,6 +57,11 @@ FscWindow::FscWindow( intf_thread_t *pIntf, int left, int top, // opacity overridden by user m_opacity = 255 * var_InheritFloat( getIntf(), "qt-fs-opacity" ); + // fullscreen-controller timeout overridden by user + m_delay = var_InheritInteger( getIntf(), "mouse-hide-timeout" ) / FSC_COUNT; + if( m_delay <= 0 ) + m_delay = FSC_DELAY; + // register Fsc VoutManager::instance( getIntf())->registerFSC( this ); } @@ -85,7 +90,7 @@ void FscWindow::onMouseMoved( ) m_pTimer->stop(); m_count = FSC_COUNT; setOpacity( m_opacity ); - m_pTimer->start( FSC_DELAY, false ); + m_pTimer->start( m_delay, false ); } } } @@ -130,7 +135,7 @@ void FscWindow::processEvent( EvtLeave &rEvtLeave ) m_count = FSC_COUNT; setOpacity( m_opacity ); - m_pTimer->start( FSC_DELAY, false ); + m_pTimer->start( m_delay, false ); TopWindow::processEvent( rEvtLeave ); } @@ -156,7 +161,7 @@ void FscWindow::innerShow() m_count = FSC_COUNT; setOpacity( m_opacity ); - m_pTimer->start( FSC_DELAY, false ); + m_pTimer->start( m_delay, false ); } diff --git a/modules/gui/skins2/src/fsc_window.hpp b/modules/gui/skins2/src/fsc_window.hpp index 9224490..67f9b98 100644 --- a/modules/gui/skins2/src/fsc_window.hpp +++ b/modules/gui/skins2/src/fsc_window.hpp @@ -67,6 +67,8 @@ private: int m_count; /// opacity set by user int m_opacity; + /// delay set by user + int m_delay; /// Callback for the timer DEFINE_CALLBACK( FscWindow, FscHide ) _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
