-rw-r--r-- | core/launcher/launcherview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index 1598d13..30afe64 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp | |||
@@ -143,49 +143,49 @@ public: | |||
143 | //int backgroundMode = 2; | 143 | //int backgroundMode = 2; |
144 | 144 | ||
145 | if ( backgroundMode == 1 ) { | 145 | if ( backgroundMode == 1 ) { |
146 | 146 | ||
147 | // Double buffer the background | 147 | // Double buffer the background |
148 | static QPixmap *bg = NULL; | 148 | static QPixmap *bg = NULL; |
149 | static QColor bgColor; | 149 | static QColor bgColor; |
150 | 150 | ||
151 | if ( (bg == NULL) || (bgColor != colorGroup().button()) ) { | 151 | if ( (bg == NULL) || (bgColor != colorGroup().button()) ) { |
152 | // Create a new background double buffer | 152 | // Create a new background double buffer |
153 | if (bg == NULL) | 153 | if (bg == NULL) |
154 | bg = new QPixmap( width(), height() ); | 154 | bg = new QPixmap( width(), height() ); |
155 | bgColor = colorGroup().button(); | 155 | bgColor = colorGroup().button(); |
156 | QPainter painter( bg ); | 156 | QPainter painter( bg ); |
157 | 157 | ||
158 | // 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); | 159 | painter.fillRect( QRect( 0, 0, width(), height() ), background); |
160 | // Overlay the Qtopia logo in the center | 160 | // Overlay the Qtopia logo in the center |
161 | QImage logo; | 161 | QImage logo; |
162 | if (QFile::exists(backgroundImage)) { | 162 | if (QFile::exists(backgroundImage)) { |
163 | logo = QImage(backgroundImage); | 163 | logo = QImage(backgroundImage); |
164 | } else { | 164 | } else { |
165 | logo = Resource::loadImage(backgroundImage ); | 165 | logo = Resource::loadImage(backgroundImage ); |
166 | } | 166 | } |
167 | if ( !logo.isNull() ) | 167 | if ( !logo.isNull() && config.readBoolEntry( "UseBackgroundImage", TRUE ) ) |
168 | painter.drawImage( (width() - logo.width()) / 2, | 168 | painter.drawImage( (width() - logo.width()) / 2, |
169 | (height() - logo.height()) / 2, logo ); | 169 | (height() - logo.height()) / 2, logo ); |
170 | } | 170 | } |
171 | 171 | ||
172 | // Draw the double buffer to the widget (it is tiled for when the icon view is large) | 172 | // Draw the double buffer to the widget (it is tiled for when the icon view is large) |
173 | p->drawTiledPixmap( r, *bg, QPoint( (r.x() + contentsX()) % bg->width(), | 173 | p->drawTiledPixmap( r, *bg, QPoint( (r.x() + contentsX()) % bg->width(), |
174 | (r.y() + contentsY()) % bg->height() ) ); | 174 | (r.y() + contentsY()) % bg->height() ) ); |
175 | } else if ( backgroundMode == 2 ) { | 175 | } else if ( backgroundMode == 2 ) { |
176 | static QPixmap *bg = 0; | 176 | static QPixmap *bg = 0; |
177 | static QColor bgColor; | 177 | static QColor bgColor; |
178 | if ( !bg || (bgColor != colorGroup().background()) ) { | 178 | if ( !bg || (bgColor != colorGroup().background()) ) { |
179 | bgColor = colorGroup().background(); | 179 | bgColor = colorGroup().background(); |
180 | bg = new QPixmap( width(), 9 ); | 180 | bg = new QPixmap( width(), 9 ); |
181 | QPainter painter( bg ); | 181 | QPainter painter( bg ); |
182 | for ( int i = 0; i < 3; i++ ) { | 182 | for ( int i = 0; i < 3; i++ ) { |
183 | painter.setPen( colorGroup().background().light(130) ); | 183 | painter.setPen( colorGroup().background().light(130) ); |
184 | painter.drawLine( 0, i*3, width()-1, i*3 ); | 184 | painter.drawLine( 0, i*3, width()-1, i*3 ); |
185 | painter.drawLine( 0, i*3+1, width()-1, i*3+1 ); | 185 | painter.drawLine( 0, i*3+1, width()-1, i*3+1 ); |
186 | painter.setPen( colorGroup().background().light(105) ); | 186 | painter.setPen( colorGroup().background().light(105) ); |
187 | painter.drawLine( 0, i*3+2, width()-1, i*3+2 ); | 187 | painter.drawLine( 0, i*3+2, width()-1, i*3+2 ); |
188 | } | 188 | } |
189 | } | 189 | } |
190 | p->drawTiledPixmap( r, *bg, QPoint( (r.x() + contentsX()) % bg->width(), | 190 | p->drawTiledPixmap( r, *bg, QPoint( (r.x() + contentsX()) % bg->width(), |
191 | (r.y() + contentsY()) % bg->height() ) ); | 191 | (r.y() + contentsY()) % bg->height() ) ); |