Commit e3cb87d8 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: fix the position of the FS controller on first run.

parent 25609a2c
...@@ -704,8 +704,6 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i ) ...@@ -704,8 +704,6 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i )
CONNECT( p_slowHideTimer, timeout(), this, slowHideFSC() ); CONNECT( p_slowHideTimer, timeout(), this, slowHideFSC() );
#endif #endif
adjustSize (); /* need to get real width and height for moving */
vlc_mutex_init_recursive( &lock ); vlc_mutex_init_recursive( &lock );
CONNECT( THEMIM->getIM(), voutListChanged( vout_thread_t **, int ), CONNECT( THEMIM->getIM(), voutListChanged( vout_thread_t **, int ),
...@@ -737,10 +735,12 @@ FullscreenControllerWidget::~FullscreenControllerWidget() ...@@ -737,10 +735,12 @@ FullscreenControllerWidget::~FullscreenControllerWidget()
void FullscreenControllerWidget::centerFSC( int number ) void FullscreenControllerWidget::centerFSC( int number )
{ {
screenRes = QApplication::desktop()->screenGeometry(number); screenRes = QApplication::desktop()->screenGeometry(number);
/* screen has changed, calculate new position */ /* screen has changed, calculate new position */
QPoint pos = QPoint( screenRes.x() + (screenRes.width() / 2) - (width() / 2), QPoint pos = QPoint( screenRes.x() + (screenRes.width() / 2) - (sizeHint().width() / 2),
screenRes.y() + screenRes.height() - height()); screenRes.y() + screenRes.height() - sizeHint().height());
move( pos ); move( pos );
i_screennumber = number; i_screennumber = number;
} }
......
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