-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 | |||
@@ -453,12 +453,20 @@ void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray & | |||
453 | static_cast<QWidget*>(parent())->raise(); | 453 | static_cast<QWidget*>(parent())->raise(); |
454 | } | 454 | } |
455 | } else if (msg=="doctabEnabled(int)") { | 455 | } else if (msg=="doctabEnabled(int)") { |
456 | int id; stream >> id; | 456 | int id; stream >> id; |
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 | } |
461 | 469 | ||
462 | void LauncherTabWidget::reCheckDoctab(int how) | 470 | void LauncherTabWidget::reCheckDoctab(int how) |
463 | { | 471 | { |
464 | if ((bool)how == docTabEnabled) { | 472 | if ((bool)how == docTabEnabled) { |
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 | |||
@@ -291,18 +291,13 @@ LauncherIconView::LauncherIconView( QWidget* parent, const char* name ) | |||
291 | hidden.setAutoDelete(TRUE); | 291 | hidden.setAutoDelete(TRUE); |
292 | ike = FALSE; | 292 | ike = FALSE; |
293 | calculateGrid( Bottom ); | 293 | calculateGrid( Bottom ); |
294 | connect(&m_eyeTimer,SIGNAL(timeout()),this,SLOT(stopEyeTimer())); | 294 | connect(&m_eyeTimer,SIGNAL(timeout()),this,SLOT(stopEyeTimer())); |
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 | ||
305 | LauncherIconView::~LauncherIconView() | 300 | LauncherIconView::~LauncherIconView() |
306 | { | 301 | { |
307 | odebug << "LauncherIconView::~LauncherIconView()" << oendl; | 302 | odebug << "LauncherIconView::~LauncherIconView()" << oendl; |
308 | #if 0 // debuggery | 303 | #if 0 // debuggery |
@@ -312,12 +307,27 @@ LauncherIconView::~LauncherIconView() | |||
312 | ++it; | 307 | ++it; |
313 | //odebug << "" << l << ": hidden (should remove)" << oendl; | 308 | //odebug << "" << l << ": hidden (should remove)" << oendl; |
314 | } | 309 | } |
315 | #endif | 310 | #endif |
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 | { |
320 | switch (sortmeth) { | 330 | switch (sortmeth) { |
321 | case Name: | 331 | case Name: |
322 | return a->name().lower().compare(b->name().lower()); | 332 | return a->name().lower().compare(b->name().lower()); |
323 | case Date: { | 333 | case Date: { |
@@ -367,13 +377,13 @@ void LauncherIconView::drawBackground( QPainter *p, const QRect &r ) | |||
367 | p->fillRect( r, bgColor ); | 377 | p->fillRect( r, bgColor ); |
368 | } | 378 | } |
369 | else | 379 | else |
370 | { | 380 | { |
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 |
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 | } |
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 | |||
@@ -79,14 +79,14 @@ public: | |||
79 | QColor textColor() const { return textCol; } | 79 | QColor textColor() const { return textCol; } |
80 | 80 | ||
81 | void setViewFont( const QFont & ); | 81 | void setViewFont( const QFont & ); |
82 | void clearViewFont(); | 82 | void clearViewFont(); |
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: |
89 | void clicked( const AppLnk * ); | 89 | void clicked( const AppLnk * ); |
90 | void rightPressed( AppLnk * ); | 90 | void rightPressed( AppLnk * ); |
91 | 91 | ||
92 | protected slots: | 92 | protected slots: |
@@ -166,12 +166,13 @@ public: | |||
166 | #ifdef USE_ANIMATED_BUSY_ICON_OVERLAY | 166 | #ifdef USE_ANIMATED_BUSY_ICON_OVERLAY |
167 | QPixmap busyPixmap() const { return busyPix; } | 167 | QPixmap busyPixmap() const { return busyPix; } |
168 | #endif | 168 | #endif |
169 | void setBigIcons( bool bi ); | 169 | void setBigIcons( bool bi ); |
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 | { |
174 | // We don't want rubberbanding (yet) | 175 | // We don't want rubberbanding (yet) |
175 | } | 176 | } |
176 | 177 | ||
177 | void setBusy(bool on); | 178 | void setBusy(bool on); |