author | mickeyl <mickeyl> | 2005-02-17 14:26:43 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2005-02-17 14:26:43 (UTC) |
commit | faaa7b79330fe3c5647182fafdb2bb584dc70638 (patch) (unidiff) | |
tree | ffa63faf248cf20f363b80b579855b124d34032f /core/launcher/launcherview.cpp | |
parent | 766ac02e5586cd67b75b320fe1abee513384860c (diff) | |
download | opie-faaa7b79330fe3c5647182fafdb2bb584dc70638.zip opie-faaa7b79330fe3c5647182fafdb2bb584dc70638.tar.gz opie-faaa7b79330fe3c5647182fafdb2bb584dc70638.tar.bz2 |
The response to the static background pixmap was overwhelmingly positive, hence:
* fix static background pixmap also for tiled pixmaps
* make it customizable via LauncherSettings
* enable it per default
Diffstat (limited to 'core/launcher/launcherview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/launcherview.cpp | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index e7229ee..a4c7561 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp | |||
@@ -296,8 +296,3 @@ LauncherIconView::LauncherIconView( QWidget* parent, const char* name ) | |||
296 | config.setGroup( "GUI" ); | 296 | config.setGroup( "GUI" ); |
297 | staticBackground = config.readEntry( "StaticBackground", false ); | 297 | setStaticBackgroundPicture( config.readBoolEntry( "StaticBackground", true ) ); |
298 | if ( staticBackground ) | ||
299 | { | ||
300 | setStaticBackground( true ); | ||
301 | verticalScrollBar()->setTracking( false ); | ||
302 | } | ||
303 | } | 298 | } |
@@ -317,2 +312,17 @@ LauncherIconView::~LauncherIconView() | |||
317 | 312 | ||
313 | void LauncherIconView::setStaticBackgroundPicture( bool enable ) | ||
314 | { | ||
315 | staticBackground = enable; | ||
316 | if ( staticBackground ) | ||
317 | { | ||
318 | setStaticBackground( true ); | ||
319 | verticalScrollBar()->setTracking( false ); | ||
320 | } | ||
321 | else | ||
322 | { | ||
323 | setStaticBackground( false ); | ||
324 | verticalScrollBar()->setTracking( true ); | ||
325 | } | ||
326 | } | ||
327 | |||
318 | int LauncherIconView::compare(const AppLnk* a, const AppLnk* b) | 328 | int LauncherIconView::compare(const AppLnk* a, const AppLnk* b) |
@@ -372,3 +382,3 @@ void LauncherIconView::drawBackground( QPainter *p, const QRect &r ) | |||
372 | { | 382 | { |
373 | p->drawPixmap( r.x(), r.y(), bgPixmap, r.x(), r.y(), r.width(), r.height() ); | 383 | p->drawTiledPixmap( r, bgPixmap, QPoint( r.x() % bgPixmap.width(), r.y() % bgPixmap.height() ) ); |
374 | } | 384 | } |
@@ -376,4 +386,4 @@ void LauncherIconView::drawBackground( QPainter *p, const QRect &r ) | |||
376 | { | 386 | { |
377 | p->drawTiledPixmap( r, bgPixmap, QPoint( (r.x() + contentsX()) % bgPixmap.width(), | 387 | p->drawTiledPixmap( r, bgPixmap, QPoint( (r.x() + contentsX()) % bgPixmap.width(), |
378 | (r.y() + contentsY()) % bgPixmap.height() ) ); | 388 | (r.y() + contentsY()) % bgPixmap.height() ) ); |
379 | } | 389 | } |