Qt: detect the screen size at startup since some screens are too small for some windows.
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 21 Jan 2009 14:48:18 +0000 (15:48 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 21 Jan 2009 14:48:18 +0000 (15:48 +0100)
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.hpp

index a942350..96b6060 100644 (file)
@@ -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" ) &&
index 32a6ab6..a39b978 100644 (file)
@@ -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 */