summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Moskal <bartlomiej.moskal@qt.io>2023-09-19 12:56:34 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-09-19 22:05:59 +0000
commita3877cf7399f1b103d3a237b291b2a45ea9ba54e (patch)
tree1192fc7a7e19c82e36f7a94d8e068fdbf2f128b4
parent9559eee6a7d6bb0f37f950db39b870d40a71ba87 (diff)
Example: Fix wrong positions of Popups
Declarative-camera example handles Portrait and Landscape states. These states affect popup anchors: - when moving to "MobileLandscape" state, anchors.right was set to parent.left; - when moving to "MobilePortrait" state, anchors.right/anchors.left were not updated; Because of that, popups were moved out of the screen after changing states: Portrait->Landscape->Portrait. This commit sets correct horizontal anchor for Popup (for MobilePortrait state). Pick-to: 6.2 Fixes: QTBUG-114083 Change-Id: I1470c0ead3dbb5248bb77650519b5eef6f8eb6ff Reviewed-by: Artem Dyomin <artem.dyomin@qt.io> Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> (cherry picked from commit d438df6cd24f2a299ce5b8aff91ec82334596bd1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 40719a19171e0cd349903bea148f29aa89d795ee)
-rw-r--r--examples/multimedia/declarative-camera/CameraListButton.qml1
-rw-r--r--examples/multimedia/declarative-camera/CameraPropertyButton.qml1
2 files changed, 2 insertions, 0 deletions
diff --git a/examples/multimedia/declarative-camera/CameraListButton.qml b/examples/multimedia/declarative-camera/CameraListButton.qml
index b859d4378..e20281754 100644
--- a/examples/multimedia/declarative-camera/CameraListButton.qml
+++ b/examples/multimedia/declarative-camera/CameraListButton.qml
@@ -45,6 +45,7 @@ Item {
AnchorChanges {
target: popup
anchors.bottom: parent.top;
+ anchors.left: parent.left;
}
},
State {
diff --git a/examples/multimedia/declarative-camera/CameraPropertyButton.qml b/examples/multimedia/declarative-camera/CameraPropertyButton.qml
index eee82de5b..e116d4e51 100644
--- a/examples/multimedia/declarative-camera/CameraPropertyButton.qml
+++ b/examples/multimedia/declarative-camera/CameraPropertyButton.qml
@@ -44,6 +44,7 @@ Item {
AnchorChanges {
target: popup
anchors.bottom: parent.top;
+ anchors.left: parent.left;
}
},
State {