From 83a0bdac74584f8b201f8a297d5bc0857bb99e9c Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sun, 25 May 2008 21:47:09 +0000 Subject: [PATCH] and unhover without anims. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812650 --- widgets/icon.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/widgets/icon.cpp b/widgets/icon.cpp index d039529f0..dfd246252 100644 --- a/widgets/icon.cpp +++ b/widgets/icon.cpp @@ -502,7 +502,17 @@ void Icon::setSvg(const QString &svgFilePath, const QString &elementId) void Icon::hoverEffect(bool show) { + if (show) { + d->states |= Private::HoverState; + } + if (d->m_hoverAnimId == -1 && !d->drawBg) { + // we do this only when we don't do the anim, because + // this gets set at animation end when we are animating + if (!show) { + d->states &= ~Private::HoverState; + } + return; } @@ -1091,7 +1101,6 @@ void Icon::hoverEnterEvent(QGraphicsSceneHoverEvent *event) action->show(); action->event(event->type(), event->pos()); } - d->states |= Private::HoverState; hoverEffect(true); update();