-rw-r--r-- | core/launcher/launcherview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index 047fe45..c2bde53 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp @@ -658,97 +658,97 @@ void LauncherView::setViewMode( ViewMode m ) void LauncherView::setBackgroundType( BackgroundType t, const QString &val ) { if ( !bgCache ) bgCache = new QMap<QString,BgPixmap*>; if ( bgCache->contains( bgName ) ) (*bgCache)[bgName]->ref--; switch ( t ) { case Ruled: { bgName = QString("Ruled_%1").arg(colorGroup().background().name()); // No tr QPixmap bg; if ( bgCache->contains( bgName ) ) { (*bgCache)[bgName]->ref++; bg = (*bgCache)[bgName]->pm; } else { bg.resize( width(), 9 ); QPainter painter( &bg ); for ( int i = 0; i < 3; i++ ) { painter.setPen( white ); painter.drawLine( 0, i*3, width()-1, i*3 ); painter.drawLine( 0, i*3+1, width()-1, i*3+1 ); painter.setPen( colorGroup().background().light(105) ); painter.drawLine( 0, i*3+2, width()-1, i*3+2 ); } painter.end(); bgCache->insert( bgName, new BgPixmap(bg) ); } icons->setBackgroundPixmap( bg ); break; } case SolidColor: icons->setBackgroundPixmap( QPixmap() ); if ( val.isEmpty() ) { icons->setBackgroundColor( colorGroup().base() ); } else { icons->setBackgroundColor( val ); } bgName = ""; break; case Image: bgName = val; if ( bgCache->contains( bgName ) ) { (*bgCache)[bgName]->ref++; icons->setBackgroundPixmap( (*bgCache)[bgName]->pm ); } else { qDebug( "Loading image: %s", val.latin1() ); - QPixmap bg( Resource::loadPixmap( "wallpaper/" + val ) ); + QPixmap bg( Resource::loadPixmap( val ) ); if ( bg.isNull() ) { QImageIO imgio; imgio.setFileName( bgName ); QSize ds = qApp->desktop()->size(); QString param( "Scale( %1, %2, ScaleMin )" ); // No tr imgio.setParameters( param.arg(ds.width()).arg(ds.height()).latin1() ); imgio.read(); bg = imgio.image(); } bgCache->insert( bgName, new BgPixmap(bg) ); icons->setBackgroundPixmap( bg ); } break; } // remove unreferenced backgrounds. QMap<QString,BgPixmap*>::Iterator it = bgCache->begin(); while ( it != bgCache->end() ) { QMap<QString,BgPixmap*>::Iterator curr = it; ++it; if ( (*curr)->ref == 0 ) { delete (*curr); bgCache->remove( curr ); } } bgType = t; icons->viewport()->update(); } void LauncherView::setTextColor( const QColor &tc ) { textCol = tc; QColorGroup cg = icons->colorGroup(); cg.setColor( QColorGroup::Text, tc ); icons->setPalette( QPalette(cg,cg,cg) ); icons->viewport()->update(); } void LauncherView::setViewFont( const QFont &f ) { icons->setFont( f ); } void LauncherView::resizeEvent(QResizeEvent *e) { QVBox::resizeEvent( e ); if ( e->size().width() != e->oldSize().width() ) |