[Marble-commits] KDE/kdeedu/marble/src/lib
Dennis Nienhüser
earthwings at gentoo.org
Thu Dec 30 12:12:50 CET 2010
SVN commit 1210271 by nienhueser:
Smaller icons and list mode for improvied usability on small screen devices.
M +13 -5 MarbleThemeSelectView.cpp
--- trunk/KDE/kdeedu/marble/src/lib/MarbleThemeSelectView.cpp #1210270:1210271
@@ -11,16 +11,18 @@
//
#include "MarbleThemeSelectView.h"
+
+#include "global.h"
#include "MarbleDirs.h"
-
#include "MapWizard.h"
#include "MarbleDebug.h"
+
+#include <QtCore/QFileInfo>
+#include <QtCore/QFile>
+#include <QtCore/QDir>
#include <QtGui/QResizeEvent>
#include <QtGui/QMenu>
#include <QtGui/QMessageBox>
-#include <QtCore/QFileInfo>
-#include <QtCore/QFile>
-#include <QtCore/QDir>
using namespace Marble;
@@ -97,7 +99,14 @@
: QListView( parent ),
d( new Private( this ) )
{
+ bool const smallScreen = MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen;
+ if ( smallScreen ) {
+ setViewMode( QListView::ListMode );
+ setIconSize( QSize( 64, 64 ) );
+ } else {
setViewMode( QListView::IconMode );
+ setIconSize( QSize( 136, 136 ) );
+ }
setFlow( QListView::LeftToRight );
setWrapping( true );
setMovement( QListView::Static );
@@ -105,7 +114,6 @@
setUniformItemSizes( true );
setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
setEditTriggers( QAbstractItemView::NoEditTriggers );
- setIconSize( QSize( 136,136 ) );
setSelectionMode( QAbstractItemView::SingleSelection );
connect( this, SIGNAL( pressed( QModelIndex ) ),
More information about the Marble-commits
mailing list