Unbreak the fadeIn animation, add a temporary workaround until trunk depends on 4.6

svn path=/trunk/KDE/kdelibs/; revision=1030871
This commit is contained in:
Jacopo De Simoi 2009-10-03 11:37:19 +00:00
parent cab81476e3
commit e90a75ec51

View File

@ -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,13 +124,13 @@ 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");
}
}
void ItemBackground::setTargetItem(QGraphicsItem *target)
{