summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp4
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.h2
-rw-r--r--noncore/todayplugins/stockticker/stocktickerlib/ticker.cpp6
3 files changed, 9 insertions, 3 deletions
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp
index 82dfb13..baf8198 100644
--- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp
+++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.cpp
@@ -44,13 +44,15 @@ QWidget* StockTickerPlugin::widget( QWidget * wid ) {
QString StockTickerPlugin::pixmapNameConfig() const {
return 0l;
}
TodayConfigWidget* StockTickerPlugin::configWidget( QWidget* wid ) {
return 0l;
}
QString StockTickerPlugin::appName() const {
return "stockticker";
}
-
+bool StockTickerPlugin::excludeFromRefresh() const {
+return true;
+}
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.h b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.h
index 9f174bf..7e7698f 100644
--- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.h
+++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerplugin.h
@@ -31,17 +31,17 @@ class StockTickerPlugin : public TodayPluginObject {
public:
StockTickerPlugin();
~StockTickerPlugin();
QString pluginName() const;
double versionNumber() const;
QString pixmapNameWidget() const;
QWidget* widget(QWidget *);
QString pixmapNameConfig() const;
TodayConfigWidget* configWidget(QWidget *);
QString appName() const;
-
+ bool excludeFromRefresh() const;
};
#endif
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/ticker.cpp b/noncore/todayplugins/stockticker/stocktickerlib/ticker.cpp
index 6e6273b..3bdc820 100644
--- a/noncore/todayplugins/stockticker/stocktickerlib/ticker.cpp
+++ b/noncore/todayplugins/stockticker/stocktickerlib/ticker.cpp
@@ -46,31 +46,35 @@
#include <stdio.h>
#include "ticker.h"
Ticker::Ticker( QWidget* parent=0 ) : QFrame( parent ) {
setFrameStyle( NoFrame/*WinPanel | Sunken */);
}
Ticker::~Ticker() {
}
void Ticker::setText( const QString& text ) {
+ Config cfg("qpe");
+ cfg.setGroup("Appearance");
pos = 0; // reset it everytime the text is changed
scrollText = text;
int pixelLen = fontMetrics().width( text );
QPixmap pm( pixelLen, contentsRect().height() );
- pm.fill( QColor( 167, 212, 167 ) );
+// pm.fill( QColor( 167, 212, 167 ));
+
+ pm.fill( QColor( cfg.readEntry( "Background", "#E5E1D5" ) ));
QPainter pmp( &pm );
pmp.setPen( Qt::black );
pmp.drawText( 0, 0, pixelLen, contentsRect().height(), AlignVCenter, scrollText );
pmp.end();
scrollTextPixmap = pm;
killTimers();
if ( pixelLen > contentsRect().width() )
startTimer( 50 );
update();
}