diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-10-28 09:34:00 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-11-03 09:14:48 +0100 |
commit | d7862eac1b09f9fb28e540970d5cc98cb6479c52 (patch) | |
tree | 46ff6bc99d2b8aafcc60c766973a3e9c04529bdf /examples/quick/keyinteraction | |
parent | 2a60d5eb1c06b9a3b36af324a8c44bdc0cb9d523 (diff) |
Update examples to use new PropertyChanges
Also, prefer the multi-line syntax over ';'-separated bindings for
readability.
Change-Id: I3d6eb854e514ee257ca83773a11e6e9e10770bff
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples/quick/keyinteraction')
4 files changed, 42 insertions, 16 deletions
diff --git a/examples/quick/keyinteraction/focus/Core/GridMenu.qml b/examples/quick/keyinteraction/focus/Core/GridMenu.qml index 78d6654957..46b903457c 100644 --- a/examples/quick/keyinteraction/focus/Core/GridMenu.qml +++ b/examples/quick/keyinteraction/focus/Core/GridMenu.qml @@ -105,7 +105,12 @@ FocusScope { states: State { name: "active"; when: container.activeFocus - PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 } + PropertyChanges { + content { + color: "#FCFFF5" + scale: 1.1 + } + } } transitions: Transition { diff --git a/examples/quick/keyinteraction/focus/Core/ListViewDelegate.qml b/examples/quick/keyinteraction/focus/Core/ListViewDelegate.qml index 5a2957eab0..971e39cff1 100644 --- a/examples/quick/keyinteraction/focus/Core/ListViewDelegate.qml +++ b/examples/quick/keyinteraction/focus/Core/ListViewDelegate.qml @@ -87,8 +87,13 @@ Item { states: State { name: "active"; when: container.activeFocus - PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 } - PropertyChanges { target: label; font.pixelSize: 16 } + PropertyChanges { + content { + color: "#FCFFF5" + scale: 1.1 + } + label.font.pixelSize: 16 + } } transitions: Transition { diff --git a/examples/quick/keyinteraction/focus/Core/TabMenu.qml b/examples/quick/keyinteraction/focus/Core/TabMenu.qml index 11b3d005c3..9feb46afbc 100644 --- a/examples/quick/keyinteraction/focus/Core/TabMenu.qml +++ b/examples/quick/keyinteraction/focus/Core/TabMenu.qml @@ -100,7 +100,12 @@ FocusScope { states: State { name: "active"; when: container.activeFocus - PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 } + PropertyChanges { + content { + color: "#FCFFF5" + scale: 1.1 + } + } } transitions: Transition { diff --git a/examples/quick/keyinteraction/focus/focus.qml b/examples/quick/keyinteraction/focus/focus.qml index 9db9ab48bc..b3c79d7ead 100644 --- a/examples/quick/keyinteraction/focus/focus.qml +++ b/examples/quick/keyinteraction/focus/focus.qml @@ -119,23 +119,29 @@ Rectangle { states: [ State { name: "showTabViews" - PropertyChanges { target: tabMenu; y: 160 } - PropertyChanges { target: gridMenu; y: 320 } - PropertyChanges { target: listMenu; y: 640 } + PropertyChanges { + tabMenu.y: 160 + gridMenu.y: 320 + listMenu.y: 640 + } }, State { name: "showGridViews" - PropertyChanges { target: tabMenu; y: 0 } - PropertyChanges { target: gridMenu; y: 160 } - PropertyChanges { target: listMenu; y: 480 } + PropertyChanges { + tabMenu.y: 0 + gridMenu.y: 160 + listMenu.y: 480 + } }, State { name: "showListViews" - PropertyChanges { target: tabMenu; y: -160 } - PropertyChanges { target: gridMenu; y: 0 } - PropertyChanges { target: listMenu; y: 320 } + PropertyChanges { + tabMenu.y: -160 + gridMenu.y: 0 + listMenu.y: 320 + } } ] @@ -166,9 +172,14 @@ Rectangle { states: State { name: "contextMenuOpen" when: !mainView.activeFocus - PropertyChanges { target: contextMenu; x: 0; open: true } - PropertyChanges { target: mainView; x: 130 } - PropertyChanges { target: shade; opacity: 0.25 } + PropertyChanges { + contextMenu { + x: 0 + open: true + } + mainView.x: 130 + shade.opacity: 0.25 + } } transitions: Transition { |