[Marble-commits] KDE/kdeedu/marble/src
Dennis Nienhüser
earthwings at gentoo.org
Wed Oct 6 21:33:51 CEST 2010
SVN commit 1183276 by nienhueser:
optimize size for maemo
M +2 -2 QtMainWindow.cpp
M +12 -0 lib/MapViewWidget.cpp
--- trunk/KDE/kdeedu/marble/src/QtMainWindow.cpp #1183275:1183276
@@ -1125,7 +1125,7 @@
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok, Qt::Horizontal, m_mapViewDialog );
connect(buttonBox, SIGNAL( accepted() ), m_mapViewDialog, SLOT( accept() ) );
- QVBoxLayout* layout = new QVBoxLayout( this );
+ QVBoxLayout* layout = new QVBoxLayout;
layout->addWidget( mapViewWidget );
layout->addWidget( buttonBox );
m_mapViewDialog->setLayout( layout );
@@ -1158,7 +1158,7 @@
QDialogButtonBox *buttonBox = new QDialogButtonBox( QDialogButtonBox::Ok, Qt::Horizontal, m_routingDialog );
connect(buttonBox, SIGNAL( accepted() ), m_routingDialog, SLOT( accept() ) );
- QVBoxLayout* layout = new QVBoxLayout( this );
+ QVBoxLayout* layout = new QVBoxLayout;
layout->addWidget( routingWidget );
layout->addWidget( buttonBox );
m_routingDialog->setLayout( layout );
--- trunk/KDE/kdeedu/marble/src/lib/MapViewWidget.cpp #1183275:1183276
@@ -24,6 +24,7 @@
// Qt
#include <QtGui/QStandardItemModel>
+#include <QtGui/QGridLayout>
using namespace Marble;
// Ui
@@ -81,6 +82,17 @@
{
d->m_mapViewUi.setupUi( this );
+ if ( MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen ) {
+ QGridLayout* layout = new QGridLayout;
+ layout->addItem( d->m_mapViewUi.verticalLayout->takeAt( 0 ), 0, 0 );
+ layout->addItem( d->m_mapViewUi.verticalLayout->takeAt( 0 ), 0, 1 );
+ d->m_mapViewUi.line->setVisible( false );
+ layout->addItem( d->m_mapViewUi.verticalLayout->takeAt( 1 ), 1, 0 );
+ layout->addItem( d->m_mapViewUi.verticalLayout->takeAt( 1 ), 1, 1 );
+ d->m_mapViewUi.verticalLayout->insertLayout( 0, layout );
+ d->m_mapViewUi.mapThemeLabel->setVisible( false );
+ }
+
d->m_mapSortProxy = new MapThemeSortFilterProxyModel( this );
d->m_mapThemeModel = 0;
More information about the Marble-commits
mailing list