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

Dennis Nienhüser earthwings at gentoo.org
Sat Nov 13 23:26:33 CET 2010


SVN commit 1196686 by nienhueser:

Use a larger clear icon on Maemo (line edits on maemo are quite large)

 M  +4 -5      RoutingLineEdit.cpp  


--- trunk/KDE/kdeedu/marble/src/lib/routing/RoutingLineEdit.cpp #1196685:1196686
@@ -68,12 +68,11 @@
         return;
     }
 
-    if ( layoutDirection() == Qt::LeftToRight ) {
-        d->m_clearButton->setPixmap( QPixmap( ":/icons/edit-clear-locationbar-rtl.png" ) );
-    } else {
-        d->m_clearButton->setPixmap( QPixmap ( ":/icons/edit-clear-locationbar-ltr.png" ) );
+    QString const direction = layoutDirection() == Qt::LeftToRight ? "rtl" : "ltr";
+    int const size = MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen ? 22 : 16;
+    QPixmap pixmap = QPixmap( QString( ":/icons/%1x%1/edit-clear-locationbar-%2.png").arg( size ).arg( direction ) );
+    d->m_clearButton->setPixmap( pixmap );
     }
-}
 
 void RoutingLineEdit::updateClearButton()
 {


More information about the Marble-commits mailing list