Commit 735354e7 authored by Erwan Tulou's avatar 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
parent 6da1479b
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
/** /**
* Fading out is computed in the following way: * 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 * - a total of FSC_COUNT transitions are processed before
* hiding the controller * hiding the controller
* - transparency is changed in the following way : * - transparency is changed in the following way :
...@@ -57,6 +57,11 @@ FscWindow::FscWindow( intf_thread_t *pIntf, int left, int top, ...@@ -57,6 +57,11 @@ FscWindow::FscWindow( intf_thread_t *pIntf, int left, int top,
// opacity overridden by user // opacity overridden by user
m_opacity = 255 * var_InheritFloat( getIntf(), "qt-fs-opacity" ); 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 // register Fsc
VoutManager::instance( getIntf())->registerFSC( this ); VoutManager::instance( getIntf())->registerFSC( this );
} }
...@@ -85,7 +90,7 @@ void FscWindow::onMouseMoved( ) ...@@ -85,7 +90,7 @@ void FscWindow::onMouseMoved( )
m_pTimer->stop(); m_pTimer->stop();
m_count = FSC_COUNT; m_count = FSC_COUNT;
setOpacity( m_opacity ); setOpacity( m_opacity );
m_pTimer->start( FSC_DELAY, false ); m_pTimer->start( m_delay, false );
} }
} }
} }
...@@ -130,7 +135,7 @@ void FscWindow::processEvent( EvtLeave &rEvtLeave ) ...@@ -130,7 +135,7 @@ void FscWindow::processEvent( EvtLeave &rEvtLeave )
m_count = FSC_COUNT; m_count = FSC_COUNT;
setOpacity( m_opacity ); setOpacity( m_opacity );
m_pTimer->start( FSC_DELAY, false ); m_pTimer->start( m_delay, false );
TopWindow::processEvent( rEvtLeave ); TopWindow::processEvent( rEvtLeave );
} }
...@@ -156,7 +161,7 @@ void FscWindow::innerShow() ...@@ -156,7 +161,7 @@ void FscWindow::innerShow()
m_count = FSC_COUNT; m_count = FSC_COUNT;
setOpacity( m_opacity ); setOpacity( m_opacity );
m_pTimer->start( FSC_DELAY, false ); m_pTimer->start( m_delay, false );
} }
......
...@@ -67,6 +67,8 @@ private: ...@@ -67,6 +67,8 @@ private:
int m_count; int m_count;
/// opacity set by user /// opacity set by user
int m_opacity; int m_opacity;
/// delay set by user
int m_delay;
/// Callback for the timer /// Callback for the timer
DEFINE_CALLBACK( FscWindow, FscHide ) DEFINE_CALLBACK( FscWindow, FscHide )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment