[Marble-commits] KDE/kdeedu/marble/src/plugins/render/routing
Dennis Nienhüser
earthwings at gentoo.org
Wed Nov 10 22:03:57 CET 2010
SVN commit 1195331 by nienhueser:
Work around the visual glitches of the progress bar in the routing float item on Maemo.
M +11 -0 RoutingPlugin.cpp
--- trunk/KDE/kdeedu/marble/src/plugins/render/routing/RoutingPlugin.cpp #1195330:1195331
@@ -34,6 +34,7 @@
#include <QtGui/QFont>
#include <QtGui/QActionGroup>
#include <QtGui/QPixmap>
+#include <QtGui/QPlastiqueStyle>
#include <QtCore/QDebug>
namespace Marble
@@ -349,6 +350,16 @@
d->m_widgetItem = new WidgetGraphicsItem( this );
d->m_widgetItem->setWidget( widget );
+ bool const smallScreen = MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen;
+ if ( smallScreen ) {
+ /** @todo: The maemo styling of the progressbar adds a black background and some frame
+ * which are even painted when no background painting is requested like WidgetItem does.
+ * This looks really bad on a float item. Using a different style here, but that is only
+ * a workaround.
+ */
+ d->m_widget.progressBar->setStyle( new QPlastiqueStyle );
+ }
+
MarbleGraphicsGridLayout *layout = new MarbleGraphicsGridLayout( 1, 1 );
layout->addItem( d->m_widgetItem, 0, 0 );
setLayout( layout );
More information about the Marble-commits
mailing list