don't draw the background if the state is not hover or pressed

BUG:240570

svn path=/trunk/KDE/kdelibs/; revision=1134320
This commit is contained in:
Marco Martin 2010-06-03 22:04:55 +00:00
parent 7aa44c8d93
commit 935e4cb57c

View File

@ -740,6 +740,10 @@ void IconWidgetPrivate::drawBackground(QPainter *painter, IconWidgetState state)
return;
}
if (!(states & IconWidgetPrivate::HoverState) && !(states & IconWidgetPrivate::PressedState)) {
return;
}
if (state == IconWidgetPrivate::PressedState) {
background->setElementPrefix("selected");
} else {