From e8971babe07370f8900e0129c2db67c7def5e7ce Mon Sep 17 00:00:00 2001 From: Tomi Korpipaa Date: Thu, 12 Jan 2023 11:01:31 +0200 Subject: Fix qmlmultigraph example for portrait mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: QTBUG-110041 Change-Id: I5b85b5eb57bd4b368ff678073c0d64d08987d0cf Reviewed-by: Kwanghyo Park Reviewed-by: Tomi Korpipää (cherry picked from commit 48ed1e71fada95944b51c35e83e45d4e40faa1d8) Reviewed-by: Qt Cherry-pick Bot --- .../datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml | 8 +++++--- 1 file 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 } } -- cgit v1.2.3