fix itemChange
svn path=/trunk/KDE/kdelibs/; revision=1017574
This commit is contained in:
parent
c3ae74a0aa
commit
087e42ead7
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user