]> git.sesse.net Git - vlc/commitdiff
qt4: improve the layout of files in file open dialog
authorDamien Fouilleul <damienf@videolan.org>
Fri, 25 May 2007 14:49:17 +0000 (14:49 +0000)
committerDamien Fouilleul <damienf@videolan.org>
Fri, 25 May 2007 14:49:17 +0000 (14:49 +0000)
modules/gui/qt4/components/open.cpp

index 8e0a9b9d3e6f1256958a17a0e9b44638b4f94468..d98e85380f53c9d7a7f0128a8b3a9f68eb38f3b3 100644 (file)
@@ -33,6 +33,7 @@
 #include <QDialogButtonBox>
 #include <QLineEdit>
 #include <QStackedLayout>
+#include <QListView>
 
 #ifdef HAVE_LIMITS_H
 #   include <limits.h>
@@ -99,6 +100,14 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     /* Change the text that was uncool in the usual box */
     listLabel[5]->setText( qtr( "Filter:" ) );
 
+    QListView *fileListView = findChildren<QListView*>().first();
+    fileListView->setViewMode(QListView::ListMode);
+    fileListView->setResizeMode(QListView::Adjust);
+    fileListView->setWrapping(true);
+    fileListView->setFlow(QListView::TopToBottom);
+    fileListView->setUniformItemSizes(false);
+    fileListView->setLayoutMode(QListView::Batched);
+
     // Hide the subtitles control by default.
     ui.subFrame->hide();