author | drw <drw> | 2002-05-18 20:59:09 (UTC) |
---|---|---|
committer | drw <drw> | 2002-05-18 20:59:09 (UTC) |
commit | 1d935738d89d038e05013d8d099bcf4da14073ea (patch) (unidiff) | |
tree | 449b1a9185ede01d2fe7f90249603bc3a2f4f473 | |
parent | dd86981ce4191e7916dc97c114267763c9a07018 (diff) | |
download | opie-1d935738d89d038e05013d8d099bcf4da14073ea.zip opie-1d935738d89d038e05013d8d099bcf4da14073ea.tar.gz opie-1d935738d89d038e05013d8d099bcf4da14073ea.tar.bz2 |
Added Launcher icon text and background color options
-rw-r--r-- | core/launcher/launcherview.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
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 @@ | |||
42 | 42 | ||
43 | class LauncherIconView : public QIconView { | 43 | class LauncherIconView : public QIconView { |
44 | public: | 44 | public: |
45 | QColor iconText; | ||
46 | QColor background; | ||
47 | |||
45 | LauncherIconView( QWidget* parent, const char* name=0 ) : | 48 | LauncherIconView( QWidget* parent, const char* name=0 ) : |
46 | QIconView(parent,name), | 49 | QIconView(parent,name), |
47 | tf(""), | 50 | tf(""), |
@@ -51,6 +54,11 @@ public: | |||
51 | sortmeth = Name; | 54 | sortmeth = Name; |
52 | hidden.setAutoDelete(TRUE); | 55 | hidden.setAutoDelete(TRUE); |
53 | ike = FALSE; | 56 | ike = FALSE; |
57 | |||
58 | Config config( "qpe" ); | ||
59 | config.setGroup( "Appearance" ); | ||
60 | iconText = QColor( config.readEntry( "LauncherIconText", "#000000" ) ); | ||
61 | background = QColor( config.readEntry( "LauncherBackground", "#FFFFFF" ) ); | ||
54 | } | 62 | } |
55 | 63 | ||
56 | ~LauncherIconView() | 64 | ~LauncherIconView() |
@@ -147,7 +155,8 @@ public: | |||
147 | bgColor = colorGroup().button(); | 155 | bgColor = colorGroup().button(); |
148 | QPainter painter( bg ); | 156 | QPainter painter( bg ); |
149 | 157 | ||
150 | painter.fillRect( QRect( 0, 0, width(), height() ), colorGroup().background().light(110)); | 158 | // painter.fillRect( QRect( 0, 0, width(), height() ), colorGroup().background().light(110)); |
159 | painter.fillRect( QRect( 0, 0, width(), height() ), background); | ||
151 | // Overlay the Qtopia logo in the center | 160 | // Overlay the Qtopia logo in the center |
152 | QImage logo; | 161 | QImage logo; |
153 | if (QFile::exists(backgroundImage)) { | 162 | if (QFile::exists(backgroundImage)) { |
@@ -287,6 +296,10 @@ public: | |||
287 | liv->setItemTextBackground( cg.brush( QColorGroup::Highlight ) ); | 296 | liv->setItemTextBackground( cg.brush( QColorGroup::Highlight ) ); |
288 | mycg.setColor( QColorGroup::Text, cg.color( QColorGroup::HighlightedText ) ); | 297 | mycg.setColor( QColorGroup::Text, cg.color( QColorGroup::HighlightedText ) ); |
289 | } | 298 | } |
299 | else { | ||
300 | mycg.setColor( QColorGroup::Text, liv->iconText ); | ||
301 | } | ||
302 | |||
290 | QIconViewItem::paintItem(p,mycg); | 303 | QIconViewItem::paintItem(p,mycg); |
291 | if ( liv->currentItem() == this ) | 304 | if ( liv->currentItem() == this ) |
292 | liv->setItemTextBackground( oldBrush ); | 305 | liv->setItemTextBackground( oldBrush ); |