Put the Simple Prefs Icons one above the other.
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 2 Mar 2007 00:02:59 +0000 (00:02 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 2 Mar 2007 00:02:59 +0000 (00:02 +0000)
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.hpp

index f36a8ee..8c03b35 100644 (file)
@@ -58,11 +58,15 @@ SPrefsCatList::SPrefsCatList( intf_thread_t *_p_intf, QWidget *_parent ) :
 {
     setIconSize( QSize( ITEM_HEIGHT,ITEM_HEIGHT ) );
     setAlternatingRowColors( true );
 {
     setIconSize( QSize( ITEM_HEIGHT,ITEM_HEIGHT ) );
     setAlternatingRowColors( true );
-
-#define ADD_CATEGORY( id, label, icon )                             \
-    addItem( label );                                               \
-    item( id )->setIcon( QIcon( QPixmap( icon ) ) );                \
-    item( id )->setData( Qt::UserRole, qVariantFromValue( (int)id ) );
+    setViewMode(QListView::IconMode);
+    setMaximumWidth(200);
+
+#define ADD_CATEGORY( id, label, icon )                                 \
+    addItem( label );                                                   \
+    item( id )->setIcon( QIcon( QPixmap( icon ) ) );                    \
+    item( id )->setData( Qt::UserRole, qVariantFromValue( (int)id ) );  \
+    item( id )->setTextAlignment(Qt::AlignHCenter);                     \
+    item( id )->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
 
     ADD_CATEGORY( SPrefsVideo, qtr("Video"), video_50x50_xpm );
     ADD_CATEGORY( SPrefsAudio, qtr("Audio"), audio_50x50_xpm );
 
     ADD_CATEGORY( SPrefsVideo, qtr("Video"), video_50x50_xpm );
     ADD_CATEGORY( SPrefsAudio, qtr("Audio"), audio_50x50_xpm );
index 977c706..b9ff672 100644 (file)
@@ -32,7 +32,6 @@ enum {
     SPrefsVideo = 0,
     SPrefsAudio,
     SPrefsInputAndCodecs,
     SPrefsVideo = 0,
     SPrefsAudio,
     SPrefsInputAndCodecs,
-//    SPrefsPlaylist,
     SPrefsInterface,
     SPrefsSubtitles,
     SPrefsHotkeys,
     SPrefsInterface,
     SPrefsSubtitles,
     SPrefsHotkeys,