diff --git a/layouts/boxlayout.cpp b/layouts/boxlayout.cpp index 6d4f5b506..928a0612b 100644 --- a/layouts/boxlayout.cpp +++ b/layouts/boxlayout.cpp @@ -290,6 +290,18 @@ int BoxLayout::count() const 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) { if (!item || d->children.contains(item)) { diff --git a/layouts/boxlayout.h b/layouts/boxlayout.h index b6aab5016..b41090131 100644 --- a/layouts/boxlayout.h +++ b/layouts/boxlayout.h @@ -75,6 +75,7 @@ class PLASMA_EXPORT BoxLayout : public Layout virtual LayoutItem *takeAt(int i); virtual Qt::Orientations expandingDirections() const; virtual int count() const; + virtual void setAnimator(LayoutAnimator* animator); virtual QSizeF minimumSize() const; virtual QSizeF maximumSize() const;