]> git.sesse.net Git - vlc/commitdiff
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 a942350015abcbc85c9de000a9cdb921c32a46dc..96b606043cbece42809b7f1ec57b86213fde950f 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 32a6ab6768a73eb464b4e4f9f578d3d90d3477a4..a39b978c16c53f663b393f47d16e54a3dca2e898 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 */