when setting an animator, we need to associate our children with it.

this probably needs to be done to the other layouts too.
BUG:155596

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=760655
This commit is contained in:
Aaron J. Seigo 2008-01-13 08:22:04 +00:00
parent d191de06d3
commit 755efb64e8
2 changed files with 13 additions and 0 deletions

View File

@ -290,6 +290,18 @@ int BoxLayout::count() const
return d->children.count(); return d->children.count();
} }
void BoxLayout::setAnimator(LayoutAnimator *animator)
{
Layout::setAnimator(animator);
if (animator) {
foreach (LayoutItem *item, d->children) {
animator->setGeometry(item, item->geometry());
animator->setCurrentState(item, LayoutAnimator::StandardState);
}
}
}
void BoxLayout::insertItem(int index, LayoutItem *item) void BoxLayout::insertItem(int index, LayoutItem *item)
{ {
if (!item || d->children.contains(item)) { if (!item || d->children.contains(item)) {

View File

@ -75,6 +75,7 @@ class PLASMA_EXPORT BoxLayout : public Layout
virtual LayoutItem *takeAt(int i); virtual LayoutItem *takeAt(int i);
virtual Qt::Orientations expandingDirections() const; virtual Qt::Orientations expandingDirections() const;
virtual int count() const; virtual int count() const;
virtual void setAnimator(LayoutAnimator* animator);
virtual QSizeF minimumSize() const; virtual QSizeF minimumSize() const;
virtual QSizeF maximumSize() const; virtual QSizeF maximumSize() const;