fix itemChange

svn path=/trunk/KDE/kdelibs/; revision=1017574
This commit is contained in:
Marco Martin 2009-08-30 22:44:47 +00:00
parent c3ae74a0aa
commit 087e42ead7
2 changed files with 9 additions and 5 deletions

View File

@ -106,6 +106,10 @@ QVariant ItemBackground::itemChange(GraphicsItemChange change, const QVariant &v
{
if (change == ItemVisibleChange) {
bool visible = value.toBool();
bool retVisible = visible;
if (visible == isVisible() || d->animId == 0) {
retVisible = true;
}
d->fading = true;
d->fadeIn = visible;
@ -115,7 +119,9 @@ QVariant ItemBackground::itemChange(GraphicsItemChange change, const QVariant &v
d->animId = Plasma::Animator::self()->customAnimation(
10, 250, Plasma::Animator::EaseInCurve, this, "animationUpdate");
return retVisible;
}
return value;
}
void ItemBackground::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)

View File

@ -23,9 +23,6 @@
#include <QGraphicsWidget>
namespace Plasma {
class FrameSvg;
}
/**
* @class ItemBackground plasma/widgets/itembackground.h
@ -34,8 +31,9 @@ namespace Plasma {
*
* @since 4.4
*/
namespace Plasma
{
namespace Plasma {
class FrameSvg;
class ItemBackgroundPrivate;
class ItemBackground : public QGraphicsWidget