summaryrefslogtreecommitdiff
path: root/core/launcher
Side-by-side diff
Diffstat (limited to 'core/launcher') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/launcherview.cpp27
-rw-r--r--core/launcher/launcherview.h3
2 files changed, 23 insertions, 7 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
@@ -289,12 +289,20 @@ LauncherIconView::LauncherIconView( QWidget* parent, const char* name )
if (!sm_EyeCache) sm_EyeCache = new QMap<QString,QPixmap>();
sortmeth = Name;
hidden.setAutoDelete(TRUE);
ike = FALSE;
calculateGrid( Bottom );
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 );
+ }
}
LauncherIconView::~LauncherIconView()
{
odebug << "LauncherIconView::~LauncherIconView()" << oendl;
#if 0 // debuggery
@@ -351,19 +359,28 @@ void LauncherIconView::setItemTextPos( ItemTextPos pos )
calculateGrid( pos );
QIconView::setItemTextPos( pos );
}
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() ) );
+ }
+ }
}
void LauncherIconView::addCatsAndMimes(AppLnk* app)
{
// QStringList c = app->categories();
// for (QStringList::ConstIterator cit=c.begin(); cit!=c.end(); ++cit) {
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
@@ -34,14 +34,12 @@ class LauncherItem;
class QIconViewItem;
class QLabel;
class QWidgetStack;
class MenuButton;
class QComboBox;
-
-
enum BusyIndicatorType {
BIT_Normal = 0,
BIT_Animated
};
class LauncherView : public QVBox
@@ -247,9 +245,10 @@ private:
#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
QPixmap busyPix;
#endif
BusyIndicatorType busyType;
QTimer m_eyeTimer;
int numColumns;
+ bool staticBackground;
};
#endif // LAUNCHERVIEW_H