-rw-r--r-- | core/launcher/launcher.cpp | 8 | ||||
-rw-r--r-- | core/launcher/launcherview.cpp | 24 | ||||
-rw-r--r-- | core/launcher/launcherview.h | 3 | ||||
-rw-r--r-- | core/settings/launcher/tabssettings.cpp | 11 | ||||
-rw-r--r-- | core/settings/launcher/tabssettings.h | 2 |
5 files changed, 38 insertions, 10 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 | { |
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp index 42f0568..fca6b20 100644 --- a/core/settings/launcher/tabssettings.cpp +++ b/core/settings/launcher/tabssettings.cpp | |||
@@ -85,4 +85,7 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name ) | |||
85 | lay-> addMultiCellWidget ( m_busyani, 6, 6, 0, 1 ); | 85 | lay-> addMultiCellWidget ( m_busyani, 6, 6, 0, 1 ); |
86 | 86 | ||
87 | m_staticbackground = new QCheckBox( tr( "Enable static background pixmap" ), this ); | ||
88 | lay->addMultiCellWidget( m_staticbackground, 7, 7, 0, 1 ); | ||
89 | |||
87 | p1-> setEnabled ( false ); | 90 | p1-> setEnabled ( false ); |
88 | p3-> setEnabled ( false ); | 91 | p3-> setEnabled ( false ); |
@@ -96,4 +99,5 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name ) | |||
96 | QWhatsThis::add ( m_bigbusy, tr( "Activate this, if you want a big busy indicator in the middle of the screen instead of the one in taskbar." )); | 99 | QWhatsThis::add ( m_bigbusy, tr( "Activate this, if you want a big busy indicator in the middle of the screen instead of the one in taskbar." )); |
97 | QWhatsThis::add ( m_busyani, tr( "Activate this, if you want an animatedbusy indicator for starting applications in the Launcher." )); | 100 | QWhatsThis::add ( m_busyani, tr( "Activate this, if you want an animatedbusy indicator for starting applications in the Launcher." )); |
101 | QWhatsThis::add ( m_staticbackground, tr( "Activate this, if you want the background pixmap not to scroll with the icons." )); | ||
98 | } | 102 | } |
99 | 103 | ||
@@ -123,4 +127,5 @@ void TabsSettings::init ( ) | |||
123 | m_busyani-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "animated" ); | 127 | m_busyani-> setChecked ( cfg. readEntry ( "BusyType" ). lower ( ) == "animated" ); |
124 | m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) ); | 128 | m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) ); |
129 | m_staticbackground->setChecked( cfg.readBoolEntry( "StaticBackground", true ) ); | ||
125 | } | 130 | } |
126 | 131 | ||
@@ -280,6 +285,6 @@ void TabsSettings::accept ( ) | |||
280 | QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" ); | 285 | QString busytype = QString ( m_busyani-> isChecked ( ) ? "Animated" : "" ); |
281 | cfg. writeEntry ( "BusyType", busytype ); | 286 | cfg. writeEntry ( "BusyType", busytype ); |
282 | |||
283 | cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) ); | 287 | cfg. writeEntry ( "BigBusy", m_bigbusy->isChecked( ) ); |
288 | cfg. writeEntry ( "StaticBackground", m_staticbackground->isChecked( ) ); | ||
284 | 289 | ||
285 | { | 290 | { |
@@ -287,4 +292,8 @@ void TabsSettings::accept ( ) | |||
287 | e << busytype; | 292 | e << busytype; |
288 | } | 293 | } |
294 | { | ||
295 | QCopEnvelope e ( "QPE/Launcher", "setStaticBackground(bool)" ); | ||
296 | e << m_staticbackground->isChecked(); | ||
297 | } | ||
289 | } | 298 | } |
290 | 299 | ||
diff --git a/core/settings/launcher/tabssettings.h b/core/settings/launcher/tabssettings.h index 600c65c..bbe1e72 100644 --- a/core/settings/launcher/tabssettings.h +++ b/core/settings/launcher/tabssettings.h | |||
@@ -60,5 +60,5 @@ private: | |||
60 | QStringList m_ids; | 60 | QStringList m_ids; |
61 | QMap <QString, TabConfig> m_tabs; | 61 | QMap <QString, TabConfig> m_tabs; |
62 | QCheckBox *m_busyani, *m_bigbusy; | 62 | QCheckBox *m_busyani, *m_bigbusy, *m_staticbackground; |
63 | }; | 63 | }; |
64 | 64 | ||