From b0687f08f561a879311e934b1d297e2e8c53689f Mon Sep 17 00:00:00 2001 From: llornkcor Date: Thu, 31 Oct 2002 13:57:32 +0000 Subject: no refresh, and Ticker back is users background preference --- (limited to 'noncore') 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 @@ -53,4 +53,6 @@ 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 @@ -40,7 +40,7 @@ public: QString pixmapNameConfig() const; TodayConfigWidget* configWidget(QWidget *); QString appName() const; - + bool excludeFromRefresh() const; }; 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 @@ -55,13 +55,17 @@ 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 ); -- cgit v0.9.0.2