[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/nepomuk/ui
From:       Jonathan Michael Thomas <echidnaman () kubuntu ! org>
Date:       2010-08-28 18:15:50
Message-ID: 20100828181550.99514AC857 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1169219 by jmthomas:

Use a more efficient KIconEffect::apply() overload function. The toGray effect does \
not need any extra colors specified by us, but we were using an overload that caused \
unnecessary KColorScheme calls to determine a suitable (and unused) second color.


 M  +2 -2      kratingpainter.cpp  


--- trunk/KDE/kdelibs/nepomuk/ui/kratingpainter.cpp #1169218:1169219
@@ -200,7 +200,7 @@
     QPixmap ratingPix = d->getPixmap( qMin( rect.height(), maxHSizeOnePix ) );
 
     KIconEffect *iconEffect = KIconLoader::global()->iconEffect();
-    QPixmap disabledRatingPix = iconEffect->apply( ratingPix, KIconEffect::ToGray, \
1.0, QColor(), false ); +    QPixmap disabledRatingPix = iconEffect->apply( \
ratingPix, KIconEffect::ToGray, 1.0, QColor(), QColor(), false );  QPixmap hoverPix;
 
     // if we are disabled we become gray and more transparent
@@ -217,7 +217,7 @@
     if ( hoverRating > 0 && rating != hoverRating && d->isEnabled ) {
         numHoverStars = d->bHalfSteps ? hoverRating/2 : hoverRating;
         halfHover = d->bHalfSteps && hoverRating%2;
-        hoverPix = iconEffect->apply( ratingPix, KIconEffect::ToGray, 0.5, QColor(), \
false ); +        hoverPix = iconEffect->apply( ratingPix, KIconEffect::ToGray, 0.5, \
QColor(), QColor(), false );  }
 
     if ( d->alignment & Qt::AlignJustify ) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic