[Marble-commits] KDE/kdeedu/marble/src/lib

Dennis Nienhüser earthwings at gentoo.org
Wed Oct 6 22:25:49 CEST 2010


SVN commit 1183288 by nienhueser:

Hide the lat lon box on small screen devices. It breaks the dialog layout and shouldn't be a common use case there. Instead, we should add a rubber band region selection in the future.

 M  +10 -1     DownloadRegionDialog.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/DownloadRegionDialog.cpp #1183287:1183288
@@ -156,11 +156,20 @@
     layout->addWidget( m_specifiedRegionMethodButton );
     layout->addWidget( m_latLonBoxWidget );
 
+    bool const smallScreen = MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen;
+    m_specifiedRegionMethodButton->setVisible( !smallScreen );
+    m_latLonBoxWidget->setVisible( !smallScreen );
+
+    if ( smallScreen ) {
+        QWidget * const selectionMethodWidget = new QWidget;
+        selectionMethodWidget->setLayout( layout );
+        return selectionMethodWidget;
+    } else {
     QGroupBox * const selectionMethodBox = new QGroupBox( tr( "Selection Method" ) );
     selectionMethodBox->setLayout( layout );
-
     return selectionMethodBox;
 }
+}
 
 QLayout * DownloadRegionDialog::Private::createTilesCounter()
 {


More information about the Marble-commits mailing list