diff options
author | Katja Marttila <katja.marttila@theqtcompany.com> | 2016-01-15 14:50:38 +0200 |
---|---|---|
committer | Katja Marttila <katja.marttila@theqtcompany.com> | 2016-01-18 10:19:01 +0000 |
commit | c11aa82e3b28dc1d386b8451b64365cfef893bbd (patch) | |
tree | 9d38fccc085498752d166a655988f28a2f43fa33 | |
parent | 1738491040784947389a9f869e7c552e74aa3330 (diff) |
Improve qt datavis demo
For now just minor changes, plan is to replace the buttons
with more fancy stuff
Change-Id: I32a8a17326cd52dc0927cb4f9e3a25ab65311b56
Task-number: QTRD-3782
Reviewed-by: Kimmo Ollila <kimmo.ollila@theqtcompany.com>
-rw-r--r-- | basicsuite/enterprise-qtdatavis3d/main.qml | 20 | ||||
-rw-r--r-- | basicsuite/enterprise-qtdatavis3d/preview_l.jpg | bin | 101747 -> 77166 bytes |
2 files changed, 9 insertions, 11 deletions
diff --git a/basicsuite/enterprise-qtdatavis3d/main.qml b/basicsuite/enterprise-qtdatavis3d/main.qml index a84baca..8651f2d 100644 --- a/basicsuite/enterprise-qtdatavis3d/main.qml +++ b/basicsuite/enterprise-qtdatavis3d/main.qml @@ -27,10 +27,6 @@ import "." Item { id: mainview - function toPixels(percentage) { - return percentage * Math.min(mainview.width, mainview.height); - } - Item { id: surfaceView width: mainview.width - buttonLayout.width @@ -123,6 +119,7 @@ Item { anchors.left: parent.left anchors.bottom: parent.bottom spacing: 0 + property int buttonWidth: Math.min(engine.centimeter(3), parent.height/7 - engine.mm(2)) Column { Layout.fillWidth: true spacing: 5 @@ -130,7 +127,7 @@ Item { id: layerOneToggle text: "Ground\n Layer" checked: true - width: toPixels(0.12) + width: buttonLayout.buttonWidth height: width style: ToggleButtonStyle { } } @@ -139,7 +136,7 @@ Item { id: layerTwoToggle text: "Sea\n Layer" checked: true - width: toPixels(0.12) + width: buttonLayout.buttonWidth height: width style: ToggleButtonStyle { } } @@ -148,7 +145,7 @@ Item { id: layerThreeToggle text: "Tectonic\n Layer" checked: true - width: toPixels(0.12) + width: buttonLayout.buttonWidth height: width style: ToggleButtonStyle { } } @@ -160,7 +157,7 @@ Item { ToggleButton { id: layerOneGrid text: "Ground\n as\n Grid" - width: toPixels(0.12) + width: buttonLayout.buttonWidth height: width style: ToggleButtonStyle { } onCheckedChanged: { @@ -174,7 +171,7 @@ Item { ToggleButton { id: layerTwoGrid text: "Sea\n as\n Grid" - width: toPixels(0.12) + width: buttonLayout.buttonWidth height: width style: ToggleButtonStyle { } onCheckedChanged: { @@ -188,8 +185,9 @@ Item { ToggleButton { id: layerThreeGrid text: "Tectonic\n as\n Grid" - width: toPixels(0.12) + width: buttonLayout.buttonWidth height: width + style: ToggleButtonStyle { } onCheckedChanged: { if (checked) @@ -206,7 +204,7 @@ Item { ToggleButton { id: sliceButton text: "Slice\n All\n Layers" - width: toPixels(0.12) + width: buttonLayout.buttonWidth height: width style: ToggleButtonStyle { } onClicked: { diff --git a/basicsuite/enterprise-qtdatavis3d/preview_l.jpg b/basicsuite/enterprise-qtdatavis3d/preview_l.jpg Binary files differindex 290546f..ceb7048 100644 --- a/basicsuite/enterprise-qtdatavis3d/preview_l.jpg +++ b/basicsuite/enterprise-qtdatavis3d/preview_l.jpg |