summaryrefslogtreecommitdiffstats
path: root/examples/datavisualization/qmlmultigraph
diff options
context:
space:
mode:
Diffstat (limited to 'examples/datavisualization/qmlmultigraph')
-rw-r--r--examples/datavisualization/qmlmultigraph/CMakeLists.txt2
-rw-r--r--examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml8
2 files changed, 6 insertions, 4 deletions
diff --git a/examples/datavisualization/qmlmultigraph/CMakeLists.txt b/examples/datavisualization/qmlmultigraph/CMakeLists.txt
index dae22cbd..388c5df2 100644
--- a/examples/datavisualization/qmlmultigraph/CMakeLists.txt
+++ b/examples/datavisualization/qmlmultigraph/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.14)
+cmake_minimum_required(VERSION 3.16)
project(qmlmultigraph LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml
index f30b1739..219f22d4 100644
--- a/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml
+++ b/examples/datavisualization/qmlmultigraph/qml/qmlmultigraph/main.qml
@@ -38,6 +38,8 @@ Item {
width: 800
height: 600
+ property bool portratiMode: width < height
+
Data {
id: data
}
@@ -102,7 +104,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
}
@@ -117,14 +119,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
}
}