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

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

(cherry picked from commit e3cb87d8)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 55e543cd
......@@ -704,8 +704,6 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i )
CONNECT( p_slowHideTimer, timeout(), this, slowHideFSC() );
#endif
adjustSize (); /* need to get real width and height for moving */
vlc_mutex_init_recursive( &lock );
CONNECT( THEMIM->getIM(), voutListChanged( vout_thread_t **, int ),
......@@ -737,10 +735,12 @@ FullscreenControllerWidget::~FullscreenControllerWidget()
void FullscreenControllerWidget::centerFSC( int number )
{
screenRes = QApplication::desktop()->screenGeometry(number);
/* screen has changed, calculate new position */
QPoint pos = QPoint( screenRes.x() + (screenRes.width() / 2) - (width() / 2),
screenRes.y() + screenRes.height() - height());
QPoint pos = QPoint( screenRes.x() + (screenRes.width() / 2) - (sizeHint().width() / 2),
screenRes.y() + screenRes.height() - sizeHint().height());
move( pos );
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