summaryrefslogtreecommitdiff
path: root/prototype_2016/third_party/fluid/demo/Pages/Basic/CheckBoxPage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'prototype_2016/third_party/fluid/demo/Pages/Basic/CheckBoxPage.qml')
-rw-r--r--prototype_2016/third_party/fluid/demo/Pages/Basic/CheckBoxPage.qml101
1 files changed, 101 insertions, 0 deletions
diff --git a/prototype_2016/third_party/fluid/demo/Pages/Basic/CheckBoxPage.qml b/prototype_2016/third_party/fluid/demo/Pages/Basic/CheckBoxPage.qml
new file mode 100644
index 0000000..6e53e73
--- /dev/null
+++ b/prototype_2016/third_party/fluid/demo/Pages/Basic/CheckBoxPage.qml
@@ -0,0 +1,101 @@
1/*
2 * This file is part of Fluid.
3 *
4 * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 * Copyright (C) 2017 Michael Spencer <sonrisesoftware@gmail.com>
6 *
7 * $BEGIN_LICENSE:MPL2$
8 *
9 * This Source Code Form is subject to the terms of the Mozilla Public
10 * License, v. 2.0. If a copy of the MPL was not distributed with this
11 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 *
13 * $END_LICENSE$
14 */
15
16import QtQuick 2.0
17import QtQuick.Controls 2.0
18import QtQuick.Layouts 1.0
19import Fluid.Controls 1.0
20import "../.."
21
22Flickable {
23 clip: true
24 contentHeight: Math.max(layout.implicitHeight, height)
25
26 ScrollBar.vertical: ScrollBar {}
27
28 ColumnLayout {
29 id: layout
30 anchors.fill: parent
31
32 Repeater {
33 model: 2
34
35 StyledRectangle {
36 Layout.fillWidth: true
37 Layout.fillHeight: true
38 Layout.minimumWidth: grid.width + 80
39 Layout.minimumHeight: grid.height + 80
40
41 GridLayout {
42 id: grid
43 anchors.centerIn: parent
44 columns: 3
45 rows: 3
46
47 // Row 1
48
49 Item {
50 width: 1
51 height: 1
52 }
53
54 TitleLabel {
55 text: qsTr("Enabled")
56
57 Layout.alignment: Qt.AlignHCenter
58 }
59
60 TitleLabel {
61 text: qsTr("Disabled")
62
63 Layout.alignment: Qt.AlignHCenter
64 }
65
66 // Row 2
67
68 Label {
69 text: qsTr("On")
70 }
71
72 CheckBox {
73 checked: true
74 text: qsTr("CheckBox")
75 }
76
77 CheckBox {
78 checked: true
79 enabled: false
80 text: qsTr("CheckBox")
81 }
82
83 // Row 3
84
85 Label {
86 text: qsTr("Off")
87 }
88
89 CheckBox {
90 text: qsTr("CheckBox")
91 }
92
93 CheckBox {
94 text: qsTr("CheckBox")
95 enabled: false
96 }
97 }
98 }
99 }
100 }
101}