aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/demos/stocqt/content/StockSettingsPanel.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/demos/stocqt/content/StockSettingsPanel.qml')
-rw-r--r--examples/quick/demos/stocqt/content/StockSettingsPanel.qml204
1 files changed, 89 insertions, 115 deletions
diff --git a/examples/quick/demos/stocqt/content/StockSettingsPanel.qml b/examples/quick/demos/stocqt/content/StockSettingsPanel.qml
index 0c34e453de..1ac1035789 100644
--- a/examples/quick/demos/stocqt/content/StockSettingsPanel.qml
+++ b/examples/quick/demos/stocqt/content/StockSettingsPanel.qml
@@ -39,12 +39,11 @@
****************************************************************************/
import QtQuick 2.0
+import QtQuick.Layouts 1.1
import "."
Rectangle {
id: root
- width: 440
- height: 160
color: "transparent"
property bool drawOpenPrice: openButton.buttonEnabled
@@ -58,118 +57,93 @@ Rectangle {
property string lowColor: "#f30000"
property string volumeColor: "#14aaff"
- Text {
- id: openText
- anchors.left: root.left
- anchors.top: root.top
- color: "#000000"
- font.family: Settings.fontFamily
- font.pointSize: 19
- text: "Open"
- }
-
- Text {
- id: closeText
- anchors.left: root.left
- anchors.top: openText.bottom
- anchors.topMargin: 10
- color: "#000000"
- font.family: Settings.fontFamily
- font.pointSize: 19
- text: "Close"
- }
-
- Text {
- id: highText
- anchors.left: root.left
- anchors.top: closeText.bottom
- anchors.topMargin: 10
- color: "#000000"
- font.family: Settings.fontFamily
- font.pointSize: 19
- text: "High"
- }
-
- Text {
- id: lowText
- anchors.left: root.left
- anchors.top: highText.bottom
- anchors.topMargin: 10
- color: "#000000"
- font.family: Settings.fontFamily
- font.pointSize: 19
- text: "Low"
- }
-
- Rectangle {
- height: 4
- anchors.left: root.left
- anchors.leftMargin: 114
- anchors.right: openButton.left
- anchors.rightMargin: 65
- anchors.verticalCenter: openText.verticalCenter
- color: openColor
- }
-
- Rectangle {
- height: 4
- anchors.left: root.left
- anchors.leftMargin: 114
- anchors.right: closeButton.left
- anchors.rightMargin: 65
- anchors.verticalCenter: closeText.verticalCenter
- color: closeColor
- }
-
- Rectangle {
- height: 4
- anchors.left: root.left
- anchors.leftMargin: 114
- anchors.right: highButton.left
- anchors.rightMargin: 65
- anchors.verticalCenter: highText.verticalCenter
- color: highColor
- }
-
- Rectangle {
- height: 4
- anchors.left: root.left
- anchors.leftMargin: 114
- anchors.right: lowButton.left
- anchors.rightMargin: 65
- anchors.verticalCenter: lowText.verticalCenter
- color: lowColor
- }
-
- CheckBox {
- id: openButton
- buttonEnabled: false
- anchors.verticalCenter: openText.verticalCenter
- anchors.right: root.right
- anchors.rightMargin: 40
- }
-
- CheckBox {
- id: closeButton
- buttonEnabled: false
- anchors.verticalCenter: closeText.verticalCenter
- anchors.right: root.right
- anchors.rightMargin: 40
- }
-
- CheckBox {
- id: highButton
- buttonEnabled: true
- anchors.verticalCenter: highText.verticalCenter
- anchors.right: root.right
- anchors.rightMargin: 40
- }
-
- CheckBox {
- id: lowButton
- buttonEnabled: true
- anchors.verticalCenter: lowText.verticalCenter
- anchors.right: root.right
- anchors.rightMargin: 40
+ GridLayout {
+ id: settingsGrid
+ rows: 5
+ columns: 3
+ rowSpacing: 4
+ anchors.fill: parent
+
+ Item {
+ Layout.fillHeight: true
+ Layout.columnSpan: 3
+ }
+
+ Text {
+ id: openText
+ color: "#000000"
+ font.family: Settings.fontFamily
+ font.pointSize: 19
+ text: "Open"
+ Layout.leftMargin: 10
+ }
+ Rectangle {
+ Layout.preferredHeight: 4
+ Layout.preferredWidth: 114
+ color: openColor
+ }
+ CheckBox {
+ id: openButton
+ buttonEnabled: false
+ Layout.rightMargin: 10
+ }
+
+ Text {
+ id: closeText
+ Layout.leftMargin: 10
+ color: "#000000"
+ font.family: Settings.fontFamily
+ font.pointSize: 19
+ text: "Close"
+ }
+ Rectangle {
+ Layout.preferredHeight: 4
+ Layout.preferredWidth: 114
+ color: closeColor
+ }
+ CheckBox {
+ id: closeButton
+ buttonEnabled: false
+ Layout.rightMargin: 10
+ }
+
+ Text {
+ id: highText
+ Layout.leftMargin: 10
+ color: "#000000"
+ font.family: Settings.fontFamily
+ font.pointSize: 19
+ text: "High"
+ }
+ Rectangle {
+ Layout.preferredHeight: 4
+ Layout.preferredWidth: 114
+ color: highColor
+ }
+ CheckBox {
+ id: highButton
+ buttonEnabled: true
+ Layout.rightMargin: 10
+ }
+
+ Text {
+ id: lowText
+ Layout.leftMargin: 10
+ color: "#000000"
+ font.family: Settings.fontFamily
+ font.pointSize: 19
+ text: "Low"
+ }
+ Rectangle {
+ Layout.preferredHeight: 4
+ Layout.preferredWidth: 114
+ color: lowColor
+ }
+
+ CheckBox {
+ id: lowButton
+ buttonEnabled: true
+ Layout.rightMargin: 10
+ }
}
}