summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2023-01-12 11:01:31 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-01-13 09:08:50 +0000
commite8971babe07370f8900e0129c2db67c7def5e7ce (patch)
tree92edbd730e3ece17066e7e2bab8e370f3462aa65
parent0c4960660f6459f4530b3ca088c2f787a70a1dbd (diff)
Fix qmlmultigraph example for portrait mode
Fixes: QTBUG-110041 Change-Id: I5b85b5eb57bd4b368ff678073c0d64d08987d0cf Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> (cherry picked from commit 48ed1e71fada95944b51c35e83e45d4e40faa1d8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml
index 98e19a53..07273190 100644
--- a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml
+++ b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml
@@ -12,6 +12,8 @@ Item {
width: 800
height: 600
+ property bool portratiMode: width < height
+
Data {
id: data
}
@@ -76,7 +78,7 @@ Item {
Layout.minimumWidth: parent.width / 2
Layout.fillHeight: true
Layout.fillWidth: true
- text: "Clear Selections"
+ text: portratiMode ? "Clear\nSelections" : "Clear Selections"
onClicked: clearSelections() // call a helper function to keep button itself simpler
}
@@ -91,14 +93,14 @@ Item {
Button {
Layout.fillHeight: true
Layout.fillWidth: true
- text: "Reset Cameras"
+ text: portratiMode ? "Reset\nCameras" : "Reset Cameras"
onClicked: resetCameras() // call a helper function to keep button itself simpler
}
Button {
Layout.fillHeight: true
Layout.fillWidth: true
- text: "Toggle Mesh Styles"
+ text: portratiMode ? "Toggle\nMesh\nStyles" : "Toggle Mesh Styles"
onClicked: toggleMeshStyle() // call a helper function to keep button itself simpler
}
}