summaryrefslogtreecommitdiff
path: root/core
Unidiff
Diffstat (limited to 'core') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/launcher.cpp8
-rw-r--r--core/launcher/launcherview.cpp24
-rw-r--r--core/launcher/launcherview.h3
-rw-r--r--core/settings/launcher/tabssettings.cpp11
-rw-r--r--core/settings/launcher/tabssettings.h2
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
@@ -458,2 +458,10 @@ void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray &
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 }
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
313void 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
318int LauncherIconView::compare(const AppLnk* a, const AppLnk* b) 328int 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 }
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
@@ -84,4 +84,4 @@ public:
84 void setColNumber( int ); 84 void setColNumber( int );
85
86 void relayout(void); 85 void relayout(void);
86 LauncherIconView* iconView() { return icons; };
87 87
@@ -171,2 +171,3 @@ public:
171 void setBusyIndicatorType ( BusyIndicatorType t ); 171 void setBusyIndicatorType ( BusyIndicatorType t );
172 void setStaticBackgroundPicture( bool enable );
172 void doAutoScroll() 173 void doAutoScroll()
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
@@ -86,2 +86,5 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name )
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 );
@@ -97,2 +100,3 @@ TabsSettings::TabsSettings ( QWidget *parent, const char *name )
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}
@@ -124,2 +128,3 @@ void TabsSettings::init ( )
124 m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) ); 128 m_bigbusy->setChecked( cfg. readBoolEntry ( "BigBusy" ) );
129 m_staticbackground->setChecked( cfg.readBoolEntry( "StaticBackground", true ) );
125} 130}
@@ -281,4 +286,4 @@ void TabsSettings::accept ( )
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
@@ -288,2 +293,6 @@ void TabsSettings::accept ( )
288 } 293 }
294 {
295 QCopEnvelope e ( "QPE/Launcher", "setStaticBackground(bool)" );
296 e << m_staticbackground->isChecked();
297 }
289} 298}
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
@@ -61,3 +61,3 @@ private:
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};