From 755efb64e8199bb727ea7e40e9ba8aff24b80a1b Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sun, 13 Jan 2008 08:22:04 +0000 Subject: [PATCH] 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 --- layouts/boxlayout.cpp | 12 ++++++++++++ layouts/boxlayout.h | 1 + 2 files changed, 13 insertions(+) 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;