-rw-r--r-- | core/launcher/launcherview.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index 68e3245..ed39720 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp | |||
@@ -117,71 +117,71 @@ public: | |||
117 | // cats.replace(*cit,(void*)1); | 117 | // cats.replace(*cit,(void*)1); |
118 | // } | 118 | // } |
119 | QString maj=app->type(); | 119 | QString maj=app->type(); |
120 | int sl=maj.find('/'); | 120 | int sl=maj.find('/'); |
121 | if (sl>=0) { | 121 | if (sl>=0) { |
122 | QString k = maj.left(sl); | 122 | QString k = maj.left(sl); |
123 | mimes.replace(k,(void*)1); | 123 | mimes.replace(k,(void*)1); |
124 | } | 124 | } |
125 | } | 125 | } |
126 | 126 | ||
127 | void drawBackground( QPainter *p, const QRect &r ) | 127 | void drawBackground( QPainter *p, const QRect &r ) |
128 | { | 128 | { |
129 | //int backgroundMode = QPixmap::defaultDepth() >= 12 ? 1 : 0; | 129 | int backgroundMode = QPixmap::defaultDepth() >= 12 ? 1 : 0; |
130 | int backgroundMode = 2; | 130 | //int backgroundMode = 2; |
131 | 131 | ||
132 | if ( backgroundMode == 1 ) { | 132 | if ( backgroundMode == 1 ) { |
133 | 133 | ||
134 | // Double buffer the background | 134 | // Double buffer the background |
135 | static QPixmap *bg = NULL; | 135 | static QPixmap *bg = NULL; |
136 | static QColor bgColor; | 136 | static QColor bgColor; |
137 | 137 | ||
138 | if ( (bg == NULL) || (bgColor != colorGroup().button()) ) { | 138 | if ( (bg == NULL) || (bgColor != colorGroup().button()) ) { |
139 | // Create a new background double buffer | 139 | // Create a new background double buffer |
140 | if (bg == NULL) | 140 | if (bg == NULL) |
141 | bg = new QPixmap( width(), height() ); | 141 | bg = new QPixmap( width(), height() ); |
142 | bgColor = colorGroup().button(); | 142 | bgColor = colorGroup().button(); |
143 | QPainter painter( bg ); | 143 | QPainter painter( bg ); |
144 | 144 | ||
145 | painter.fillRect( QRect( 0, 0, width(), height() ), QBrush( white ) ); | 145 | painter.fillRect( QRect( 0, 0, width(), height() ), colorGroup().background().light(110)); |
146 | 146 | ||
147 | // Overlay the Qtopia logo in the center | 147 | // Overlay the Qtopia logo in the center |
148 | QImage logo = Resource::loadImage( "qpe-logo" ); | 148 | QImage logo = Resource::loadImage( "qpe-background" ); |
149 | if ( !logo.isNull() ) | 149 | if ( !logo.isNull() ) |
150 | painter.drawImage( (width() - logo.width()) / 2, | 150 | painter.drawImage( (width() - logo.width()) / 2, |
151 | (height() - logo.height()) / 2, logo ); | 151 | (height() - logo.height()) / 2, logo ); |
152 | } | 152 | } |
153 | 153 | ||
154 | // Draw the double buffer to the widget (it is tiled for when the icon view is large) | 154 | // Draw the double buffer to the widget (it is tiled for when the icon view is large) |
155 | p->drawTiledPixmap( r, *bg, QPoint( (r.x() + contentsX()) % bg->width(), | 155 | p->drawTiledPixmap( r, *bg, QPoint( (r.x() + contentsX()) % bg->width(), |
156 | (r.y() + contentsY()) % bg->height() ) ); | 156 | (r.y() + contentsY()) % bg->height() ) ); |
157 | } else if ( backgroundMode == 2 ) { | 157 | } else if ( backgroundMode == 2 ) { |
158 | static QPixmap *bg = 0; | 158 | static QPixmap *bg = 0; |
159 | static QColor bgColor; | 159 | static QColor bgColor; |
160 | if ( !bg || (bgColor != colorGroup().background()) ) { | 160 | if ( !bg || (bgColor != colorGroup().background()) ) { |
161 | bgColor = colorGroup().background(); | 161 | bgColor = colorGroup().background(); |
162 | bg = new QPixmap( width(), 9 ); | 162 | bg = new QPixmap( width(), 9 ); |
163 | QPainter painter( bg ); | 163 | QPainter painter( bg ); |
164 | for ( int i = 0; i < 3; i++ ) { | 164 | for ( int i = 0; i < 3; i++ ) { |
165 | painter.setPen( white ); | 165 | painter.setPen( colorGroup().background().light(130) ); |
166 | painter.drawLine( 0, i*3, width()-1, i*3 ); | 166 | painter.drawLine( 0, i*3, width()-1, i*3 ); |
167 | painter.drawLine( 0, i*3+1, width()-1, i*3+1 ); | 167 | painter.drawLine( 0, i*3+1, width()-1, i*3+1 ); |
168 | painter.setPen( colorGroup().background().light(105) ); | 168 | painter.setPen( colorGroup().background().light(105) ); |
169 | painter.drawLine( 0, i*3+2, width()-1, i*3+2 ); | 169 | painter.drawLine( 0, i*3+2, width()-1, i*3+2 ); |
170 | } | 170 | } |
171 | } | 171 | } |
172 | p->drawTiledPixmap( r, *bg, QPoint( (r.x() + contentsX()) % bg->width(), | 172 | p->drawTiledPixmap( r, *bg, QPoint( (r.x() + contentsX()) % bg->width(), |
173 | (r.y() + contentsY()) % bg->height() ) ); | 173 | (r.y() + contentsY()) % bg->height() ) ); |
174 | } else { | 174 | } else { |
175 | p->fillRect( r, QBrush( white ) ); | 175 | p->fillRect( r, QBrush( colorGroup().background().light(110) ) ); |
176 | } | 176 | } |
177 | } | 177 | } |
178 | 178 | ||
179 | void hideOrShowItems(bool resort); | 179 | void hideOrShowItems(bool resort); |
180 | 180 | ||
181 | void setTypeFilter(const QString& typefilter, bool resort) | 181 | void setTypeFilter(const QString& typefilter, bool resort) |
182 | { | 182 | { |
183 | tf = QRegExp(typefilter,FALSE,TRUE); | 183 | tf = QRegExp(typefilter,FALSE,TRUE); |
184 | hideOrShowItems(resort); | 184 | hideOrShowItems(resort); |
185 | } | 185 | } |
186 | 186 | ||
187 | void setCategoryFilter( int catfilter, bool resort ) | 187 | void setCategoryFilter( int catfilter, bool resort ) |