-rw-r--r-- | core/launcher/launcher.cpp | 8 | ||||
-rw-r--r-- | core/launcher/launcherview.cpp | 24 | ||||
-rw-r--r-- | core/launcher/launcherview.h | 3 |
3 files changed, 27 insertions, 8 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 4255b44..4ec5f4c 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp | |||
@@ -457,4 +457,12 @@ void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray & | |||
457 | odebug << "Doctab enabled " << id << oendl; | 457 | odebug << "Doctab enabled " << id << oendl; |
458 | reCheckDoctab(id); | 458 | reCheckDoctab(id); |
459 | } else if ( msg == "setStaticBackground(bool)" ) { | ||
460 | int set; stream >> set; | ||
461 | odebug << "setStaticBackground " << set << oendl; | ||
462 | for (int i = 0; i < categoryBar->count(); i++ ) | ||
463 | { | ||
464 | LauncherView* view = static_cast<LauncherTab*>( categoryBar->tab(i) )->view; | ||
465 | view->iconView()->setStaticBackgroundPicture( set ); | ||
466 | } | ||
459 | } | 467 | } |
460 | } | 468 | } |
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 | |||
@@ -295,10 +295,5 @@ LauncherIconView::LauncherIconView( QWidget* parent, const char* name ) | |||
295 | Config config( "Launcher" ); | 295 | Config config( "Launcher" ); |
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 | } |
304 | 299 | ||
@@ -316,4 +311,19 @@ LauncherIconView::~LauncherIconView() | |||
316 | } | 311 | } |
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) |
319 | { | 329 | { |
@@ -371,5 +381,5 @@ void LauncherIconView::drawBackground( QPainter *p, const QRect &r ) | |||
371 | if ( staticBackground ) | 381 | if ( staticBackground ) |
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 | } |
375 | else | 385 | else |
diff --git a/core/launcher/launcherview.h b/core/launcher/launcherview.h index 97b1dea..6a2d197 100644 --- a/core/launcher/launcherview.h +++ b/core/launcher/launcherview.h | |||
@@ -83,6 +83,6 @@ public: | |||
83 | 83 | ||
84 | void setColNumber( int ); | 84 | void setColNumber( int ); |
85 | |||
86 | void relayout(void); | 85 | void relayout(void); |
86 | LauncherIconView* iconView() { return icons; }; | ||
87 | 87 | ||
88 | signals: | 88 | signals: |
@@ -170,4 +170,5 @@ public: | |||
170 | void updateCategoriesAndMimeTypes(); | 170 | void updateCategoriesAndMimeTypes(); |
171 | void setBusyIndicatorType ( BusyIndicatorType t ); | 171 | void setBusyIndicatorType ( BusyIndicatorType t ); |
172 | void setStaticBackgroundPicture( bool enable ); | ||
172 | void doAutoScroll() | 173 | void doAutoScroll() |
173 | { | 174 | { |