don't animate pressed buttons, avoids flicker

svn path=/trunk/KDE/kdelibs/; revision=882058
This commit is contained in:
Marco Martin 2008-11-09 17:00:49 +00:00
parent 271b20924e
commit 0c5a17b624

View File

@ -355,6 +355,10 @@ void PushButton::paint(QPainter *painter,
void PushButton::hoverEnterEvent(QGraphicsSceneHoverEvent *event) void PushButton::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{ {
if (nativeWidget()->isDown()) {
return;
}
const int FadeInDuration = 75; const int FadeInDuration = 75;
if (d->animId != -1) { if (d->animId != -1) {
@ -371,6 +375,10 @@ void PushButton::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
void PushButton::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void PushButton::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{ {
if (nativeWidget()->isDown()) {
return;
}
const int FadeOutDuration = 150; const int FadeOutDuration = 150;
if (d->animId != -1) { if (d->animId != -1) {