Backport: Added missing condition: isDown() == true.

now toolbuttons look pressed when isDown() == true.

svn path=/branches/KDE/4.4/kdelibs/; revision=1076851
This commit is contained in:
Davide Bettio 2010-01-18 23:16:48 +00:00
parent c0a7a4fd57
commit c174905f76

View File

@ -335,7 +335,7 @@ void ToolButton::paint(QPainter *painter,
buttonOpt.toolButtonStyle = button->toolButtonStyle();
if (button->isEnabled() && (d->animId || !button->autoRaise() || d->underMouse || (buttonOpt.state & QStyle::State_On) || button->isChecked())) {
if (button->isEnabled() && (d->animId || !button->autoRaise() || d->underMouse || (buttonOpt.state & QStyle::State_On) || button->isChecked() || button->isDown())) {
if (button->isDown() || (buttonOpt.state & QStyle::State_On) || button->isChecked()) {
d->background->setElementPrefix("pressed");
} else {