]> git.sesse.net Git - vlc/commitdiff
Qt: fix the position of the FS controller on first run.
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 10 Jun 2009 22:55:46 +0000 (00:55 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 11 Jun 2009 22:29:27 +0000 (00:29 +0200)
(cherry picked from commit e3cb87d819c8e719a96f155e73c2e2521a89677d)

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/gui/qt4/components/controller.cpp

index 5ee5d63a362d452eba68f6f8095f4657cbfc4725..bd850540064f9a24361b8b66de69f704a322ae09 100644 (file)
@@ -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;
 }