From e36acd415138adcaac6f7eaecad4584a97336277 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 4 Apr 2008 20:17:49 +0000 Subject: [PATCH] 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 --- delegate.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/delegate.cpp b/delegate.cpp index 037e13587..f5db4e4c7 100644 --- a/delegate.cpp +++ b/delegate.cpp @@ -306,31 +306,20 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem& option, cons QIcon decorationIcon = index.data(Qt::DecorationRole).value(); 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);