remove a couple of tricks used prior to the selection rect that now look over the top

* don't bold on hover for a calmer look
 * don't scale down the icons (made them blurry anyways)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=793687
This commit is contained in:
Aaron J. Seigo 2008-04-04 20:17:49 +00:00
parent 9859202dbe
commit e36acd4151

View File

@ -306,31 +306,20 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem& option, cons
QIcon decorationIcon = index.data(Qt::DecorationRole).value<QIcon>();
if (index.data(d->roles[ColumnTypeRole]).toInt() == SecondaryActionColumn) {
if (hover) {
// Only draw on hover
const int delta = floor((qreal)(ICON_SIZE - ACTION_ICON_SIZE)/2.0);
decorationRect.adjust(delta, delta-1, -delta-1, -delta);
decorationIcon.paint(painter, decorationRect, option.decorationAlignment);
}
//If not hover don't draw anything
// as default always draw as main column
} else {
if (!hover) {
decorationRect.adjust(2, 2, -2, -2);
}
// as default always draw as main column
decorationIcon.paint(painter, decorationRect, option.decorationAlignment);
}
painter->save();
// draw title
if (hover) {
titleFont.setBold(true);
}
painter->setFont(titleFont);
painter->drawText(titleRect, Qt::AlignLeft|Qt::AlignVCenter, titleText);