summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-16 10:44:09 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-16 10:44:09 (GMT)
commit636698a5f97401a9aeb18cd690d7f08b05dcd5e6 (patch)
tree65050b764e1aeb3f002cd929ce443cb26ff98a2a /src
parent8d8566d061e26f18e1bde1255fdc1375035c8eaa (diff)
parent975b1913e44128a3e9b9055f9bf2ff40d86adf2a (diff)
downloadQt-636698a5f97401a9aeb18cd690d7f08b05dcd5e6.zip
Qt-636698a5f97401a9aeb18cd690d7f08b05dcd5e6.tar.gz
Qt-636698a5f97401a9aeb18cd690d7f08b05dcd5e6.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Fix RightBearing confusion in text layout fixes, improvements for various docs and example code Fixed debugger's evaluation of dynamic properties in context Allow test to pass on smaller screens (eg. 480 high). Minor animation doc improvement
Diffstat (limited to 'src')
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeenginedebug.cpp2
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp166
-rw-r--r--src/declarative/util/qdeclarativesmoothedanimation.cpp44
-rw-r--r--src/declarative/util/qdeclarativespringanimation.cpp32
-rw-r--r--src/declarative/util/qdeclarativestate.cpp24
-rw-r--r--src/declarative/util/qdeclarativetransition.cpp96
-rw-r--r--src/gui/text/qtextlayout.cpp2
8 files changed, 264 insertions, 104 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
index 44c206b..4881248 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -149,6 +149,8 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage()
\endqml
The URL may be absolute, or relative to the URL of the component.
+
+ \sa QDeclarativeImageProvider
*/
void QDeclarativeBorderImage::setSource(const QUrl &url)
{
diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp
index 001da46..008d054 100644
--- a/src/declarative/qml/qdeclarativeenginedebug.cpp
+++ b/src/declarative/qml/qdeclarativeenginedebug.cpp
@@ -495,7 +495,7 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId,
QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression);
} else {
QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context);
- QDeclarativeProperty property(object, propertyName);
+ QDeclarativeProperty property(object, propertyName, context);
binding->setTarget(property);
binding->setNotifyOnValueChanged(true);
QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, binding);
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index bdb9510..88ec5ba 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -634,13 +634,23 @@ QAbstractAnimation *QDeclarativePauseAnimation::qtAnimation()
\inherits PropertyAnimation
\brief The ColorAnimation element allows you to animate color changes.
- \code
- ColorAnimation { from: "white"; to: "#c0c0c0"; duration: 100 }
- \endcode
+ ColorAnimation defines an animation to be applied when a color value
+ changes.
+
+ Here is a ColorAnimation applied to the \c color property of a \l Rectangle
+ as a property value source:
+
+ \snippet doc/src/snippets/declarative/coloranimation.qml 0
+
+ Like any other animation element, a NumberAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
When used in a transition, ColorAnimation will by default animate
- all properties of type color that are changing. If a property or properties
- are explicitly set for the animation, then those will be used instead.
+ all properties of type color that have changed. If a \l{PropertyAnimation::}{property}
+ or \l{PropertyAnimation::}{properties} are explicitly set for the animation,
+ then those are used instead.
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -665,6 +675,17 @@ QDeclarativeColorAnimation::~QDeclarativeColorAnimation()
/*!
\qmlproperty color ColorAnimation::from
This property holds the starting color.
+
+ For example, the following animation is not applied until a color value
+ has reached "#c0c0c0":
+
+ Item {
+ states: [ ... ]
+
+ transition: Transition {
+ NumberAnimation { from: "#c0c0c0"; duration: 2000 }
+ }
+ }
*/
QColor QDeclarativeColorAnimation::from() const
{
@@ -1098,11 +1119,22 @@ void QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions,
\inherits PropertyAnimation
\brief The NumberAnimation element allows you to animate changes in properties of type qreal.
- For example, to animate a set of properties over 200ms, from their values in the start state to
- their values in the end state of the transition:
- \code
- NumberAnimation { properties: "x,y,scale"; duration: 200 }
- \endcode
+ NumberAnimation defines an animation to be applied when a numerical value
+ changes.
+
+ Here is a NumberAnimation applied to the \c x property of a \l Rectangle
+ as a property value source:
+
+ \snippet doc/src/snippets/declarative/numberanimation.qml 0
+
+ Like any other animation element, a NumberAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
+
+ Note that NumberAnimation may not animate smoothly if there are irregular
+ changes in the number value that it is tracking. If this is the case, use
+ SmoothedAnimation instead.
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -1137,9 +1169,23 @@ void QDeclarativeNumberAnimation::init()
/*!
\qmlproperty real NumberAnimation::from
- This property holds the starting value.
- If not set, then the value defined in the start state of the transition.
+ This property holds the starting number value.
+
+ For example, the following animation is not applied until the \c x value
+ has reached 100:
+
+ Item {
+ states: [ ... ]
+
+ transition: Transition {
+ NumberAnimation { properties: "x"; from: 100; duration: 200 }
+ }
+ }
+
+ If this value is not set, it defaults to the value defined in the start
+ state of the \l Transition.
*/
+
qreal QDeclarativeNumberAnimation::from() const
{
Q_D(const QDeclarativePropertyAnimation);
@@ -1153,8 +1199,10 @@ void QDeclarativeNumberAnimation::setFrom(qreal f)
/*!
\qmlproperty real NumberAnimation::to
- This property holds the ending value.
- If not set, then the value defined in the end state of the transition or Behavior.
+ This property holds the ending number value.
+
+ If this value is not set, it defaults to the value defined in the end
+ state of the \l Transition or \l Behavior.
*/
qreal QDeclarativeNumberAnimation::to() const
{
@@ -1199,7 +1247,9 @@ QDeclarativeVector3dAnimation::~QDeclarativeVector3dAnimation()
/*!
\qmlproperty real Vector3dAnimation::from
This property holds the starting value.
- If not set, then the value defined in the start state of the transition.
+
+ If this value is not set, it defaults to the value defined in the start
+ state of the \l Transition.
*/
QVector3D QDeclarativeVector3dAnimation::from() const
{
@@ -1215,7 +1265,9 @@ void QDeclarativeVector3dAnimation::setFrom(QVector3D f)
/*!
\qmlproperty real Vector3dAnimation::to
This property holds the ending value.
- If not set, then the value defined in the end state of the transition or Behavior.
+
+ If this value is not set, it defaults to the value defined in the end
+ state of the \l Transition or \l Behavior.
*/
QVector3D QDeclarativeVector3dAnimation::to() const
{
@@ -1320,8 +1372,21 @@ QDeclarativeRotationAnimation::~QDeclarativeRotationAnimation()
/*!
\qmlproperty real RotationAnimation::from
- This property holds the starting value.
- If not set, then the value defined in the start state of the transition.
+ This property holds the starting number value.
+
+ For example, the following animation is not applied until the \c angle value
+ has reached 100:
+
+ Item {
+ states: [ ... ]
+
+ transition: Transition {
+ RotationAnimation { properties: "angle"; from: 100; duration: 2000 }
+ }
+ }
+
+ If this value is not set, it defaults to the value defined in the start
+ state of the \l Transition.
*/
qreal QDeclarativeRotationAnimation::from() const
{
@@ -1337,7 +1402,9 @@ void QDeclarativeRotationAnimation::setFrom(qreal f)
/*!
\qmlproperty real RotationAnimation::to
This property holds the ending value.
- If not set, then the value defined in the end state of the transition or Behavior.
+
+ If this value is not set, it defaults to the value defined in the end
+ state of the \l Transition or \l Behavior.
*/
qreal QDeclarativeRotationAnimation::to() const
{
@@ -1620,57 +1687,58 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int
\inherits Animation
\brief The PropertyAnimation element allows you to animate property changes.
- PropertyAnimation provides a way to animate changes to a property's value. It can
- be used in many different situations:
+ PropertyAnimation provides a way to animate changes to a property's value.
+
+ It can be used to define animations in a number of ways:
+
\list
- \o In a Transition
+ \o In a \l Transition
+
+ For example, to animate any objects that have changed their \c x or \c y properties
+ as a result of a state change, using an \c InOutQuad easing curve:
+
+ \snippet doc/src/snippets/declarative/propertyanimation.qml transition
+
+
+ \o In a \l Behavior
+
+ For example, to animate all changes to a rectangle's \c x property:
+
+ \snippet doc/src/snippets/declarative/propertyanimation.qml behavior
- Animate any objects that have changed their x or y properties in the target state using
- an InOutQuad easing curve:
- \qml
- Transition { PropertyAnimation { properties: "x,y"; easing.type: Easing.InOutQuad } }
- \endqml
- \o In a Behavior
- Animate all changes to a rectangle's x property.
- \qml
- Rectangle {
- Behavior on x { PropertyAnimation {} }
- }
- \endqml
\o As a property value source
- Repeatedly animate the rectangle's x property.
- \qml
- Rectangle {
- SequentialAnimation on x {
- loops: Animation.Infinite
- PropertyAnimation { to: 50 }
- PropertyAnimation { to: 0 }
- }
- }
- \endqml
+ For example, to repeatedly animate the rectangle's \c x property:
+
+ \snippet doc/src/snippets/declarative/propertyanimation.qml propertyvaluesource
+
+
\o In a signal handler
- Fade out \c theObject when clicked:
+ For example, to fade out \c theObject when clicked:
\qml
MouseArea {
anchors.fill: theObject
onClicked: PropertyAnimation { target: theObject; property: "opacity"; to: 0 }
}
\endqml
+
\o Standalone
- Animate \c theObject's size property over 200ms, from its current size to 20-by-20:
- \qml
- PropertyAnimation { target: theObject; property: "size"; to: "20x20"; duration: 200 }
- \endqml
+ For example, to animate \c rect's \c width property over 500ms, from its current width to 30:
+
+ \snippet doc/src/snippets/declarative/propertyanimation.qml standalone
+
\endlist
Depending on how the animation is used, the set of properties normally used will be
different. For more information see the individual property documentation, as well
as the \l{QML Animation} introduction.
+ Note that PropertyAnimation inherits the abstract \l Animation element.
+ This includes additional properties and methods for controlling the animation.
+
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp
index 5d47c30..e0d1097 100644
--- a/src/declarative/util/qdeclarativesmoothedanimation.cpp
+++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp
@@ -272,33 +272,8 @@ void QSmoothedAnimation::init()
with both a velocity of 200 and a duration of 8000 set.
The follow example shows one rectangle tracking the position of another.
-\code
-import Qt 4.7
-
-Rectangle {
- width: 800; height: 600; color: "blue"
-
- Rectangle {
- color: "green"
- width: 60; height: 60;
- x: rect1.x - 5; y: rect1.y - 5;
- Behavior on x { SmoothedAnimation { velocity: 200 } }
- Behavior on y { SmoothedAnimation { velocity: 200 } }
- }
-
- Rectangle {
- id: rect1
- color: "red"
- width: 50; height: 50;
- }
- focus: true
- Keys.onRightPressed: rect1.x = rect1.x + 100
- Keys.onLeftPressed: rect1.x = rect1.x - 100
- Keys.onUpPressed: rect1.y = rect1.y - 100
- Keys.onDownPressed: rect1.y = rect1.y + 100
-}
-\endcode
+ \snippet doc/src/snippets/declarative/smoothedanimation.qml 0
The default velocity of SmoothedAnimation is 200 units/second. Note that if the range of the
value being animated is small, then the velocity will need to be adjusted
@@ -307,6 +282,11 @@ Rectangle {
set to a value such as 0.5 units/second. Animating from 0 to 1.0 with a velocity
of 0.5 will take 2000 ms to complete.
+ Like any other animation element, a SmoothedAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
+
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -388,11 +368,13 @@ void QDeclarativeSmoothedAnimation::transition(QDeclarativeStateActions &actions
Sets how the SmoothedAnimation behaves if an animation direction is reversed.
- If reversing mode is \c SmoothedAnimation.Eased, the animation will smoothly decelerate, and
- then reverse direction. If the reversing mode is \c SmoothedAnimation.Immediate, the
- animation will immediately begin accelerating in the reverse direction,
- begining with a velocity of 0. If the reversing mode is \c SmoothedAnimation.Sync, the
- property is immediately set to the target value.
+ Possible values are:
+
+ \list
+ \o SmoothedAnimation.Eased (default) - the animation will smoothly decelerate, and then reverse direction
+ \o SmoothedAnimation.Immediate - the animation will immediately begin accelerating in the reverse direction, begining with a velocity of 0
+ \o SmoothedAnimation.Sync - the property is immediately set to the target value
+ \endlist
*/
QDeclarativeSmoothedAnimation::ReversingMode QDeclarativeSmoothedAnimation::reversingMode() const
{
diff --git a/src/declarative/util/qdeclarativespringanimation.cpp b/src/declarative/util/qdeclarativespringanimation.cpp
index 4cf2fc0..be0af6d 100644
--- a/src/declarative/util/qdeclarativespringanimation.cpp
+++ b/src/declarative/util/qdeclarativespringanimation.cpp
@@ -207,14 +207,24 @@ void QDeclarativeSpringAnimationPrivate::updateMode()
\qmlclass SpringAnimation QDeclarativeSpringAnimation
\since 4.7
- \brief The SpringAnimation element allows a property to track a value in a spring-like motion
+ \brief The SpringAnimation element allows a property to track a value in a spring-like motion.
SpringAnimation mimics the oscillatory behavior of a spring, with the appropriate \l spring constant to
control the acceleration and the \l damping to control how quickly the effect dies away.
You can also limit the maximum \l velocity of the animation.
+ The following \l Rectangle moves to the position of the mouse using a
+ SpringAnimation when the mouse is clicked:
+ \snippet doc/src/snippets/declarative/springanimation.qml 0
+
+ Like any other animation element, a SpringAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
+
+ \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}, {declarative/toys/clocks}{Clocks example}
*/
QDeclarativeSpringAnimation::QDeclarativeSpringAnimation(QObject *parent)
@@ -244,6 +254,11 @@ qreal QDeclarativeSpringAnimation::to() const
/*!
\qmlproperty real SpringAnimation::to
+
+ This property holds the value at which the animation will end.
+
+ If not set, the animation will continue until it reaches the
+ value that is being tracked.
*/
void QDeclarativeSpringAnimation::setTo(qreal value)
@@ -266,6 +281,11 @@ qreal QDeclarativeSpringAnimation::from() const
/*!
\qmlproperty real SpringAnimation::from
+
+ This property holds the value from which the animation will begin.
+
+ If not set, the animation will start regardless of the
+ value being tracked.
*/
void QDeclarativeSpringAnimation::setFrom(qreal value)
@@ -325,10 +345,12 @@ void QDeclarativeSpringAnimation::setSpring(qreal spring)
/*!
\qmlproperty real SpringAnimation::damping
- This property holds the spring damping constant
+ This property holds the spring damping value.
+
+ This value describes how quickly a sprung follower comes to rest.
- The damping constant describes how quickly a sprung follower comes to rest.
- Useful range is 0 - 1.0
+ The useful range is 0 - 1.0. The lower the value, the faster the
+ follower comes to rest.
*/
qreal QDeclarativeSpringAnimation::damping() const
{
@@ -348,7 +370,7 @@ void QDeclarativeSpringAnimation::setDamping(qreal damping)
/*!
\qmlproperty real SpringAnimation::epsilon
- This property holds the spring epsilon
+ This property holds the spring epsilon.
The epsilon is the rate and amount of change in the value which is close enough
to 0 to be considered equal to zero. This will depend on the usage of the value.
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index ae19a9c..9f4cc39 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -144,7 +144,7 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje
can, for example, be used to apply different sets of property values or execute
different scripts.
- The following example displays a single Rectangle. In the default state, the rectangle
+ The following example displays a single \l Rectangle. In the default state, the rectangle
is colored black. In the "clicked" state, a PropertyChanges element changes the
rectangle's color to red. Clicking within the MouseArea toggles the rectangle's state
between the default state and the "clicked" state, thus toggling the color of the
@@ -157,7 +157,7 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje
States are commonly used together with \l {state-transitions}{Transitions} to provide
animations when state changes occur.
- \note setting the state of an object from within another state of the same object is
+ \note Setting the state of an object from within another state of the same object is
not allowed.
\sa {declarative/animation/states}{states example}, {qmlstates}{States}, {state-transitions}{Transitions}, QtDeclarative
@@ -194,7 +194,7 @@ QDeclarativeState::~QDeclarativeState()
\qmlproperty string State::name
This property holds the name of the state.
- Each state should have a unique name.
+ Each state should have a unique name within its item.
*/
QString QDeclarativeState::name() const
{
@@ -226,7 +226,23 @@ bool QDeclarativeState::isWhenKnown() const
This property holds when the state should be applied.
This should be set to an expression that evaluates to \c true when you want the state to
- be applied.
+ be applied. For example, the following \l Rectangle changes in and out of the "hidden"
+ state when the \l MouseArea is pressed:
+
+ \qml
+ Rectangle {
+ id: myRect
+ width: 100; height: 100
+ color: "red"
+
+ MouseArea { id: mouseArea; anchors.fill: parent }
+
+ states: State {
+ name: "hidden"; when: mouseArea.pressed
+ PropertyChanges { target: myRect; opacity: 0 }
+ }
+ }
+ \endqml
If multiple states in a group have \c when clauses that evaluate to \c true at the same time,
the first matching state will be applied. For example, in the following snippet
diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp
index 38ed97e..34e1e2b 100644
--- a/src/declarative/util/qdeclarativetransition.cpp
+++ b/src/declarative/util/qdeclarativetransition.cpp
@@ -56,6 +56,30 @@ QT_BEGIN_NAMESPACE
\since 4.7
\brief The Transition element defines animated transitions that occur on state changes.
+ A Transition defines the animations to be applied when a \l State change occurs.
+
+ For example, the following \l Rectangle has two states: the default state, and
+ an added "moved" state. In the "moved state, the rectangle's position changes
+ to (50, 50). The added \l Transition specifies that when the rectangle
+ changes between the default and the "moved" state, any changes
+ to the \c x and \c y properties should be animated, using an \c Easing.InOutQuad.
+
+ \snippet doc/src/snippets/declarative/transition.qml 0
+
+ Items can have multiple transitions, if
+
+ To specify multiple transitions, specify \l Item::transitions as a list:
+
+ \qml
+ Item {
+ ...
+ transitions: [
+ Transition { ... }
+ Transition { ... }
+ ]
+ }
+ |endqml
+
\sa {declarative/animation/states}{states example}, {qmlstates}{States}, {state-transitions}{Transitions}, {QtDeclarative}
*/
@@ -171,18 +195,31 @@ void QDeclarativeTransition::prepare(QDeclarativeStateOperation::ActionList &act
/*!
\qmlproperty string Transition::from
\qmlproperty string Transition::to
- These properties are selectors indicating which state changes should trigger the transition.
- from is used in conjunction with to to determine when a transition should
- be applied. By default from and to are both "*" (any state). In the following example,
- the transition is applied when changing from state1 to state2.
- \code
- Transition {
- from: "state1"
- to: "state2"
- ...
+ These properties indicate the state changes that trigger the transition.
+
+ The default values for these properties is "*" (that is, any state).
+
+ For example, the following transition has not set the \c to and \c from
+ properties, so the animation is always applied when changing between
+ the two states (i.e. when the mouse is pressed and released).
+
+ \snippet doc/src/snippets/declarative/transition-from-to.qml 0
+
+ If the transition was changed to this:
+
+ \qml
+ transitions: Transition {
+ to: "brighter"
+ ColorAnimation { duration: 1000 }
+ }
}
- \endcode
+ \endqml
+
+ The animation would only be applied when changing from the default state to
+ the "brighter" state (i.e. when the mouse is pressed, but not on release).
+
+ \sa reversible
*/
QString QDeclarativeTransition::fromState() const
{
@@ -205,6 +242,24 @@ void QDeclarativeTransition::setFromState(const QString &f)
This property holds whether the transition should be automatically reversed when the conditions that triggered this transition are reversed.
The default value is false.
+
+ By default, transitions run in parallel and are applied to all state
+ changes if the \l from and \l to states have not been set. In this
+ situation, the transition is automatically applied when a state change
+ is reversed, and it is not necessary to set this property to reverse
+ the transition.
+
+ However, if a SequentialAnimation is used, or if the \l from or \l to
+ properties have been set, this property will need to be set to reverse
+ a transition when a state change is reverted. For example, the following
+ transition applies a sequential animation when the mouse is pressed,
+ and reverses the sequence of the animation when the mouse is released:
+
+ \snippet doc/src/snippets/declarative/transition-reversible.qml 0
+
+ If the transition did not set the \c to and \c reversible values, then
+ on the mouse release, the transition would play the PropertyAnimation
+ before the ColorAnimation instead of reversing the sequence.
*/
bool QDeclarativeTransition::reversible() const
{
@@ -241,12 +296,27 @@ void QDeclarativeTransition::setToState(const QString &t)
/*!
\qmlproperty list<Animation> Transition::animations
\default
+
This property holds a list of the animations to be run for this transition.
+ \qml
+ Transition {
+ PropertyAnimation { ... }
+ NumberAnimation { ... }
+ }
+ \endqml
+
The top-level animations are run in parallel. To run them sequentially,
- you can create a single SequentialAnimation which contains all the animations,
- and assign that to animations the animations property.
- \default
+ define them within a SequentialAnimation:
+
+ \qml
+ Transition {
+ SequentialAnimation {
+ PropertyAnimation { ... }
+ NumberAnimation { ... }
+ }
+ }
+ \endqml
*/
QDeclarativeListProperty<QDeclarativeAbstractAnimation> QDeclarativeTransition::animations()
{
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index d6535ea..674064e 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1935,7 +1935,7 @@ void QTextLine::layout_helper(int maxGlyphs)
// We ignore the right bearing if the minimum negative bearing is too little to
// expand the text beyond the edge.
if (sb_or_ws|breakany) {
- if (lbh.calculateNewWidth(line) + lbh.minimumRightBearing > line.width)
+ if (lbh.calculateNewWidth(line) - lbh.minimumRightBearing > line.width)
lbh.adjustRightBearing();
if (lbh.checkFullOtherwiseExtend(line)) {
if (!breakany) {