From 1d935738d89d038e05013d8d099bcf4da14073ea Mon Sep 17 00:00:00 2001 From: drw Date: Sat, 18 May 2002 20:59:09 +0000 Subject: Added Launcher icon text and background color options --- diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index 6354bb7..1598d13 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp @@ -42,6 +42,9 @@ class LauncherIconView : public QIconView { public: + QColor iconText; + QColor background; + LauncherIconView( QWidget* parent, const char* name=0 ) : QIconView(parent,name), tf(""), @@ -51,6 +54,11 @@ public: sortmeth = Name; hidden.setAutoDelete(TRUE); ike = FALSE; + + Config config( "qpe" ); + config.setGroup( "Appearance" ); + iconText = QColor( config.readEntry( "LauncherIconText", "#000000" ) ); + background = QColor( config.readEntry( "LauncherBackground", "#FFFFFF" ) ); } ~LauncherIconView() @@ -147,7 +155,8 @@ public: bgColor = colorGroup().button(); QPainter painter( bg ); - painter.fillRect( QRect( 0, 0, width(), height() ), colorGroup().background().light(110)); +// painter.fillRect( QRect( 0, 0, width(), height() ), colorGroup().background().light(110)); + painter.fillRect( QRect( 0, 0, width(), height() ), background); // Overlay the Qtopia logo in the center QImage logo; if (QFile::exists(backgroundImage)) { @@ -287,6 +296,10 @@ public: liv->setItemTextBackground( cg.brush( QColorGroup::Highlight ) ); mycg.setColor( QColorGroup::Text, cg.color( QColorGroup::HighlightedText ) ); } + else { + mycg.setColor( QColorGroup::Text, liv->iconText ); + } + QIconViewItem::paintItem(p,mycg); if ( liv->currentItem() == this ) liv->setItemTextBackground( oldBrush ); -- cgit v0.9.0.2