summaryrefslogtreecommitdiffstats
path: root/src/declarative/fx/qfxpositioners.cpp
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-09-09 01:37:49 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-09-09 01:37:49 (GMT)
commita626641fafcf5f3a2e904cd0679f62ee70e19f4e (patch)
tree6f0f73bdfcebb2935baceea53047d41f6b32535d /src/declarative/fx/qfxpositioners.cpp
parent80bd5e0206314155e8542520b4ec2fc5d9416e0e (diff)
downloadQt-a626641fafcf5f3a2e904cd0679f62ee70e19f4e.zip
Qt-a626641fafcf5f3a2e904cd0679f62ee70e19f4e.tar.gz
Qt-a626641fafcf5f3a2e904cd0679f62ee70e19f4e.tar.bz2
Positioners now implictly have the height and width of the childrenRect
Also removed the now uneccesary height and width bindings from the twitter demo login screen.
Diffstat (limited to 'src/declarative/fx/qfxpositioners.cpp')
-rw-r--r--src/declarative/fx/qfxpositioners.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/declarative/fx/qfxpositioners.cpp b/src/declarative/fx/qfxpositioners.cpp
index bad4944..e4500aa 100644
--- a/src/declarative/fx/qfxpositioners.cpp
+++ b/src/declarative/fx/qfxpositioners.cpp
@@ -251,6 +251,18 @@ void QFxBasePositioner::prePositioning()
d->_animated.clear();
doPositioning();
finishApplyTransitions();
+ //Set implicit size to the size of its children
+ //###To keep this valid, do we need to update on pos change as well?
+ qreal h = 0.0f;
+ qreal w = 0.0f;
+ foreach(QFxItem *child, d->_items){
+ if(!child->isVisible() || child->opacity() <= 0)
+ continue;
+ h = qMax(h, child->y() + child->height());
+ w = qMax(w, child->x() + child->width());
+ }
+ setImplicitHeight(h);
+ setImplicitWidth(w);
}
void QFxBasePositioner::applyTransition(const QList<QPair<QString, QVariant> >& changes, QFxItem* target, QmlStateOperation::ActionList &actions)