[vlc-devel] commit: Qt: fix the position of the FS controller on first run. ( Jean-Baptiste Kempf )

git version control git at videolan.org
Thu Jun 11 00:56:38 CEST 2009


vlc | branch: 1.0-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Thu Jun 11 00:55:46 2009 +0200| [e3cb87d819c8e719a96f155e73c2e2521a89677d] | committer: Jean-Baptiste Kempf 

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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e3cb87d819c8e719a96f155e73c2e2521a89677d
---

 modules/gui/qt4/components/controller.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index aea5a4f..778ceaa 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -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;
 }
 




More information about the vlc-devel mailing list