From 70e80c18f6deda35fabd55d5147cf3d949821c28 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Tue, 27 Apr 2010 09:46:38 +1000 Subject: doc anchor margins vs. anchor (line) state/animation. --- src/declarative/util/qdeclarativepropertychanges.cpp | 5 +++-- src/declarative/util/qdeclarativestateoperations.cpp | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index 2641dcf..8afa2f0 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -125,8 +125,9 @@ QT_BEGIN_NAMESPACE } \endqml - Changes to an Item's parent or anchors should be done using the associated change elements - (ParentChange and AnchorChanges, respectively) rather than PropertyChanges. + Anchor margins should be changed with PropertyChanges, but other anchor changes or changes to + an Item's parent should be done using the associated change elements + (ParentChange and AnchorChanges, respectively). \sa {qmlstate}{States} */ diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index 9049b83..689f53c 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -612,6 +612,11 @@ QString QDeclarativeStateChangeScript::typeName() const anchors.top: window.top; anchors.bottom: window.bottom } + PropertyChanges { + target: content; + anchors.topMargin: 3 + anchors.bottomMargin: 3; + } } \endqml @@ -623,6 +628,8 @@ QString QDeclarativeStateChangeScript::typeName() const } \endqml + Margin animations can be animated using NumberAnimation. + For more information on anchors see \l {anchor-layout}{Anchor Layouts}. */ -- cgit v0.12