From e90a75ec51d4882804237df6e1afab8103f6733f Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Sat, 3 Oct 2009 11:37:19 +0000 Subject: [PATCH] Unbreak the fadeIn animation, add a temporary workaround until trunk depends on 4.6 svn path=/trunk/KDE/kdelibs/; revision=1030871 --- widgets/itembackground.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/widgets/itembackground.cpp b/widgets/itembackground.cpp index 7297cf5ae..b883bd925 100644 --- a/widgets/itembackground.cpp +++ b/widgets/itembackground.cpp @@ -85,6 +85,15 @@ ItemBackground::ItemBackground(QGraphicsWidget *parent) setAcceptedMouseButtons(0); setZValue(-800); + + /*************** + * HACK: this is needed in order to show the itemBackground correctly the first time + * it appears to be a workaround for some other qt 4.5 clipping bug + * will be removed when trunk depends on 4.6 + */ + resize( 1, 1 ); + hide(); + //************** } ItemBackground::~ItemBackground() @@ -115,12 +124,12 @@ void ItemBackground::setTarget(const QRectF &newGeometry) setGeometry(newGeometry); d->oldGeometry = newGeometry; show(); + } else { + d->fading = false; + d->opacity = 1; + d->animId = Plasma::Animator::self()->customAnimation( + 15, 250, Plasma::Animator::EaseInOutCurve, this, "animationUpdate"); } - - d->fading = false; - d->opacity = 1; - d->animId = Plasma::Animator::self()->customAnimation( - 15, 250, Plasma::Animator::EaseInOutCurve, this, "animationUpdate"); } void ItemBackground::setTargetItem(QGraphicsItem *target)