[vlc-devel] commit: Qt: detect the screen size at startup since some screens are too small for some windows . (Jean-Baptiste Kempf )

git version control git at videolan.org
Wed Jan 21 15:51:04 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Jan 21 15:48:18 2009 +0100| [f410c43b0c6cfd1cdf18517ade4d1b058ccb467a] | committer: Jean-Baptiste Kempf 

Qt: detect the screen size at startup since some screens are too small for some windows.

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

 modules/gui/qt4/qt4.cpp |    4 ++++
 modules/gui/qt4/qt4.hpp |    2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/qt4.cpp b/modules/gui/qt4/qt4.cpp
index a942350..96b6060 100644
--- a/modules/gui/qt4/qt4.cpp
+++ b/modules/gui/qt4/qt4.cpp
@@ -355,6 +355,10 @@ static void *Thread( void *obj )
     /* Initialize timers and the Dialog Provider */
     DialogsProvider::getInstance( p_intf );
 
+    /* Detect screensize for small screens like TV or EEEpc*/
+    p_intf->p_sys->i_screenHeight =
+        app->QApplication::desktop()->availableGeometry().height();
+
 #ifdef UPDATE_CHECK
     /* Checking for VLC updates */
     if( config_GetInt( p_intf, "qt-updates-notif" ) &&
diff --git a/modules/gui/qt4/qt4.hpp b/modules/gui/qt4/qt4.hpp
index 32a6ab6..a39b978 100644
--- a/modules/gui/qt4/qt4.hpp
+++ b/modules/gui/qt4/qt4.hpp
@@ -68,6 +68,8 @@ struct intf_sys_t
 
     bool b_isDialogProvider; /* Qt mode or Skins mode */
 
+    int  i_screenHeight;     /* Detection of Small screens */
+
     playlist_t *p_playlist;  /* Core Playlist discussion */
 
     const char *psz_filepath; /* Last path used in dialogs */




More information about the vlc-devel mailing list