Update PropertyChanges in src and tools
Use generalized grouped properties rather than the target/property syntax. Change-Id: I2cf42fa7933d67aa40ded5ffd00be51be8f9b7c2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
parent
8591568c75
commit
9fc480db9a
|
@ -132,8 +132,7 @@ Rectangle {
|
|||
states: State {
|
||||
name: "WARNING"
|
||||
PropertyChanges {
|
||||
target: rectangle
|
||||
color: warning.color
|
||||
rectangle.color: warning.color
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5047,11 +5047,11 @@ QQmlListProperty<QQuickItem> QQuickItemPrivate::visibleChildren()
|
|||
states: [
|
||||
State {
|
||||
name: "red_color"
|
||||
PropertyChanges { target: root; color: "red" }
|
||||
PropertyChanges { root.color: "red" }
|
||||
},
|
||||
State {
|
||||
name: "blue_color"
|
||||
PropertyChanges { target: root; color: "blue" }
|
||||
PropertyChanges { root.color: "blue" }
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -2517,8 +2517,18 @@ void QQuickPropertyAnimation::setProperties(const QString &prop)
|
|||
Item { id: uselessItem }
|
||||
states: State {
|
||||
name: "state1"
|
||||
PropertyChanges { target: theRect; x: 200; y: 200; z: 4 }
|
||||
PropertyChanges { target: uselessItem; x: 10; y: 10; z: 2 }
|
||||
PropertyChanges {
|
||||
theRect {
|
||||
x: 200
|
||||
y: 200
|
||||
z: 4
|
||||
}
|
||||
uselessItem {
|
||||
x: 10
|
||||
y: 10
|
||||
z: 2
|
||||
}
|
||||
}
|
||||
}
|
||||
transitions: Transition {
|
||||
//animate both theRect's and uselessItem's x and y to their final values
|
||||
|
|
|
@ -61,7 +61,7 @@ T.ScrollBar {
|
|||
states: State {
|
||||
name: "active"
|
||||
when: control.policy === T.ScrollBar.AlwaysOn || (control.active && control.size < 1.0)
|
||||
PropertyChanges { target: control.contentItem; opacity: 0.75 }
|
||||
PropertyChanges { control.contentItem.opacity: 0.75 }
|
||||
}
|
||||
|
||||
transitions: Transition {
|
||||
|
|
|
@ -59,7 +59,7 @@ T.ScrollIndicator {
|
|||
states: State {
|
||||
name: "active"
|
||||
when: control.active
|
||||
PropertyChanges { target: control.contentItem; opacity: 0.75 }
|
||||
PropertyChanges { control.contentItem.opacity: 0.75 }
|
||||
}
|
||||
|
||||
transitions: [
|
||||
|
|
|
@ -63,7 +63,7 @@ T.ScrollBar {
|
|||
states: State {
|
||||
name: "active"
|
||||
when: control.policy === T.ScrollBar.AlwaysOn || (control.active && control.size < 1.0)
|
||||
PropertyChanges { target: control.contentItem; opacity: 0.75 }
|
||||
PropertyChanges { control.contentItem.opacity: 0.75 }
|
||||
}
|
||||
|
||||
transitions: Transition {
|
||||
|
|
|
@ -61,7 +61,7 @@ T.ScrollIndicator {
|
|||
states: State {
|
||||
name: "active"
|
||||
when: control.active
|
||||
PropertyChanges { target: control.contentItem; opacity: 0.75 }
|
||||
PropertyChanges { control.contentItem.opacity: 0.75 }
|
||||
}
|
||||
|
||||
transitions: [
|
||||
|
|
|
@ -59,7 +59,7 @@ T.ScrollIndicator {
|
|||
states: State {
|
||||
name: "active"
|
||||
when: control.active
|
||||
PropertyChanges { target: control.contentItem; opacity: 0.75 }
|
||||
PropertyChanges { control.contentItem.opacity: 0.75 }
|
||||
}
|
||||
|
||||
transitions: [
|
||||
|
|
|
@ -117,26 +117,16 @@ Item {
|
|||
name: "hovered"
|
||||
|
||||
PropertyChanges {
|
||||
target: normalBackground
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: hoveredBackground
|
||||
opacity: 1
|
||||
normalBackground.opacity: 0
|
||||
hoveredBackground.opacity: 1
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "pressed"
|
||||
|
||||
PropertyChanges {
|
||||
target: normalBackground
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: pressedBackground
|
||||
opacity: 1
|
||||
normalBackground.opacity: 0
|
||||
pressedBackground.opacity: 1
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -100,11 +100,12 @@ Item {
|
|||
name: "moved"
|
||||
|
||||
PropertyChanges {
|
||||
target: rectangle
|
||||
x: 567
|
||||
y: 9
|
||||
anchors.bottomMargin: 6
|
||||
anchors.topMargin: 9
|
||||
rectangle {
|
||||
x: 567
|
||||
y: 9
|
||||
anchors.bottomMargin: 6
|
||||
anchors.topMargin: 9
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue