diff options
author | Konsta Alajärvi <konsta.alajarvi@qt.io> | 2024-04-24 14:17:37 +0300 |
---|---|---|
committer | Konsta Alajärvi <konsta.alajarvi@qt.io> | 2024-05-13 09:39:22 +0300 |
commit | 20e9c489b8a9a069774da42d656e42cc41341ba6 (patch) | |
tree | 0b55ceec3b3efd3409511de97df2e1b25c707610 | |
parent | 5cc5be922d60b7451e2f8eb384ae4cf1222f5fd0 (diff) |
Fix coffee machine example recursive rearranges
Coffee Machine example gives warnings about UI component recursive
rearrengements on Settings, Insert and Ready pages when orientation
changes.
Tracked issue to originate from the coffee cup image Rectangle
container trying to resize its width based on its height.
Removed the width to height bindings.
Task-number: QTBUG-123445
Pick-to: 6.7 6.7.1
Change-Id: Idd4ee13bc2446608a2f8d5d472370c120b4d05b7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r-- | examples/demos/coffee/InsertForm.ui.qml | 9 | ||||
-rw-r--r-- | examples/demos/coffee/ReadyForm.ui.qml | 2 | ||||
-rw-r--r-- | examples/demos/coffee/SettingsForm.ui.qml | 5 |
3 files changed, 8 insertions, 8 deletions
diff --git a/examples/demos/coffee/InsertForm.ui.qml b/examples/demos/coffee/InsertForm.ui.qml index e18fe1ded..080b3f6ee 100644 --- a/examples/demos/coffee/InsertForm.ui.qml +++ b/examples/demos/coffee/InsertForm.ui.qml @@ -24,7 +24,7 @@ Item { } PropertyChanges { target: cup - Layout.alignment: Qt.AlignCenter | Qt.AlignTop + Layout.alignment: Qt.AlignCenter Layout.preferredWidth: height / 1.16 Layout.preferredHeight: root.height / 3 Layout.row: 0 @@ -32,7 +32,7 @@ Item { PropertyChanges { target: dialog Layout.row: 1 - Layout.alignment: Qt.AlignCenter | Qt.AlignTop + Layout.alignment: Qt.AlignCenter Layout.preferredWidth: root.width / 1.12 Layout.preferredHeight: root.height / 7 } @@ -60,9 +60,9 @@ Item { } PropertyChanges { target: cup - Layout.alignment: Qt.AlignCenter | Qt.AlignTop - Layout.preferredWidth: height / 1.16 + Layout.alignment: Qt.AlignCenter Layout.preferredHeight: root.height / 1.5 + Layout.preferredWidth: root.width / 5 Layout.column: 2 Layout.row: 0 } @@ -97,7 +97,6 @@ Item { anchors.horizontalCenter: parent.horizontalCenter Cup { id: cup - Layout.alignment: Qt.AlignCenter | Qt.AlignTop } Rectangle { id: dialog diff --git a/examples/demos/coffee/ReadyForm.ui.qml b/examples/demos/coffee/ReadyForm.ui.qml index de0f7c0d9..2d0c5c726 100644 --- a/examples/demos/coffee/ReadyForm.ui.qml +++ b/examples/demos/coffee/ReadyForm.ui.qml @@ -36,7 +36,7 @@ Item { PropertyChanges { target: cup Layout.alignment: Qt.AlignCenter | Qt.AlignTop - Layout.preferredWidth: height / 1.16 + Layout.preferredWidth: root.height / 3 Layout.preferredHeight: root.height / 2.5 } PropertyChanges { diff --git a/examples/demos/coffee/SettingsForm.ui.qml b/examples/demos/coffee/SettingsForm.ui.qml index 855f4de82..7d8304674 100644 --- a/examples/demos/coffee/SettingsForm.ui.qml +++ b/examples/demos/coffee/SettingsForm.ui.qml @@ -66,8 +66,9 @@ Item { PropertyChanges { target: cup Layout.column: 0 - Layout.preferredWidth: height / 1.16 - Layout.preferredHeight: root.height / 1.5 + Layout.preferredWidth: root.width / 4 + Layout.preferredHeight: root.height / 5 + Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter } PropertyChanges { |