summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp29
-rw-r--r--core/launcher/launcherview.h7
2 files changed, 26 insertions, 10 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index 2b34cc5..e7229ee 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -294,2 +294,10 @@ LauncherIconView::LauncherIconView( QWidget* parent, const char* name )
connect(&m_eyeTimer,SIGNAL(timeout()),this,SLOT(stopEyeTimer()));
+ Config config( "Launcher" );
+ config.setGroup( "GUI" );
+ staticBackground = config.readEntry( "StaticBackground", false );
+ if ( staticBackground )
+ {
+ setStaticBackground( true );
+ verticalScrollBar()->setTracking( false );
+ }
}
@@ -356,9 +364,18 @@ void LauncherIconView::drawBackground( QPainter *p, const QRect &r )
{
- if ( !bgPixmap.isNull() ) {
- p->drawTiledPixmap( r, bgPixmap,
- QPoint( (r.x() + contentsX()) % bgPixmap.width(),
- (r.y() + contentsY()) % bgPixmap.height() ) );
- } else {
+ if ( bgPixmap.isNull() )
+ {
p->fillRect( r, bgColor );
}
+ else
+ {
+ if ( staticBackground )
+ {
+ p->drawPixmap( r.x(), r.y(), bgPixmap, r.x(), r.y(), r.width(), r.height() );
+ }
+ else
+ {
+ p->drawTiledPixmap( r, bgPixmap, QPoint( (r.x() + contentsX()) % bgPixmap.width(),
+ (r.y() + contentsY()) % bgPixmap.height() ) );
+ }
+ }
}
@@ -366,3 +383,3 @@ void LauncherIconView::drawBackground( QPainter *p, const QRect &r )
void LauncherIconView::addCatsAndMimes(AppLnk* app)
- {
+{
// QStringList c = app->categories();
diff --git a/core/launcher/launcherview.h b/core/launcher/launcherview.h
index e2869eb..97b1dea 100644
--- a/core/launcher/launcherview.h
+++ b/core/launcher/launcherview.h
@@ -39,4 +39,2 @@ class QComboBox;
-
-
enum BusyIndicatorType {
@@ -84,3 +82,3 @@ public:
void clearViewFont();
-
+
void setColNumber( int );
@@ -201,3 +199,3 @@ public:
void setColNumber( int );
-
+
void drawBackground( QPainter *p, const QRect &r );
@@ -252,2 +250,3 @@ private:
int numColumns;
+ bool staticBackground;
};