summaryrefslogtreecommitdiff
path: root/prototype_2016/resources/qml/Pages/Basic
diff options
context:
space:
mode:
Diffstat (limited to 'prototype_2016/resources/qml/Pages/Basic')
-rw-r--r--prototype_2016/resources/qml/Pages/Basic/BusyIndicatorPage.qml30
-rw-r--r--prototype_2016/resources/qml/Pages/Basic/ButtonPage.qml134
-rw-r--r--prototype_2016/resources/qml/Pages/Basic/CheckBoxPage.qml112
-rw-r--r--prototype_2016/resources/qml/Pages/Basic/ProgressBarPage.qml148
-rw-r--r--prototype_2016/resources/qml/Pages/Basic/RadioButtonPage.qml110
-rw-r--r--prototype_2016/resources/qml/Pages/Basic/SliderPage.qml246
-rw-r--r--prototype_2016/resources/qml/Pages/Basic/SwitchPage.qml110
7 files changed, 480 insertions, 410 deletions
diff --git a/prototype_2016/resources/qml/Pages/Basic/BusyIndicatorPage.qml b/prototype_2016/resources/qml/Pages/Basic/BusyIndicatorPage.qml
index 13c206f..1a6341e 100644
--- a/prototype_2016/resources/qml/Pages/Basic/BusyIndicatorPage.qml
+++ b/prototype_2016/resources/qml/Pages/Basic/BusyIndicatorPage.qml
@@ -1,7 +1,7 @@
1/* 1/*
2 * This file is part of Fluid. 2 * This file is part of Fluid.
3 * 3 *
4 * Copyright (C) 2016 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> 4 * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 * 5 *
6 * $BEGIN_LICENSE:MPL2$ 6 * $BEGIN_LICENSE:MPL2$
7 * 7 *
@@ -17,17 +17,27 @@ import QtQuick.Controls 2.0
17import QtQuick.Layouts 1.0 17import QtQuick.Layouts 1.0
18import "../.." 18import "../.."
19 19
20ColumnLayout { 20Flickable {
21 Repeater { 21 clip: true
22 model: 2 22 contentHeight: Math.max(layout.implicitHeight, height)
23 23
24 StyledRectangle { 24 ScrollBar.vertical: ScrollBar {}
25 Layout.fillWidth: true
26 Layout.fillHeight: true
27 25
28 BusyIndicator { 26 ColumnLayout {
29 anchors.centerIn: parent 27 id: layout
30 running: true 28 anchors.fill: parent
29
30 Repeater {
31 model: 2
32
33 StyledRectangle {
34 Layout.fillWidth: true
35 Layout.fillHeight: true
36
37 BusyIndicator {
38 anchors.centerIn: parent
39 running: true
40 }
31 } 41 }
32 } 42 }
33 } 43 }
diff --git a/prototype_2016/resources/qml/Pages/Basic/ButtonPage.qml b/prototype_2016/resources/qml/Pages/Basic/ButtonPage.qml
index dbe22d6..6cf94fe 100644
--- a/prototype_2016/resources/qml/Pages/Basic/ButtonPage.qml
+++ b/prototype_2016/resources/qml/Pages/Basic/ButtonPage.qml
@@ -1,7 +1,7 @@
1/* 1/*
2 * This file is part of Fluid. 2 * This file is part of Fluid.
3 * 3 *
4 * Copyright (C) 2016 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> 4 * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 * 5 *
6 * $BEGIN_LICENSE:MPL2$ 6 * $BEGIN_LICENSE:MPL2$
7 * 7 *
@@ -18,86 +18,96 @@ import QtQuick.Layouts 1.0
18import Fluid.Controls 1.0 18import Fluid.Controls 1.0
19import "../.." 19import "../.."
20 20
21ColumnLayout { 21Flickable {
22 Repeater { 22 clip: true
23 model: 2 23 contentHeight: Math.max(layout.implicitHeight, height)
24 24
25 StyledRectangle { 25 ScrollBar.vertical: ScrollBar {}
26 Layout.fillWidth: true
27 Layout.fillHeight: true
28 Layout.minimumWidth: grid.width + 80
29 Layout.minimumHeight: grid.height + 80
30 26
31 GridLayout { 27 ColumnLayout {
32 id: grid 28 id: layout
33 anchors.centerIn: parent 29 anchors.fill: parent
34 columns: 2
35 rows: 4
36 30
37 // Row 1 31 Repeater {
32 model: 2
38 33
39 TitleLabel { 34 StyledRectangle {
40 text: qsTr("Enabled") 35 Layout.fillWidth: true
36 Layout.fillHeight: true
37 Layout.minimumWidth: grid.width + 80
38 Layout.minimumHeight: grid.height + 80
41 39
42 Layout.alignment: Qt.AlignHCenter 40 GridLayout {
43 } 41 id: grid
42 anchors.centerIn: parent
43 columns: 2
44 rows: 4
44 45
45 TitleLabel { 46 // Row 1
46 text: qsTr("Disabled")
47 47
48 Layout.alignment: Qt.AlignHCenter 48 TitleLabel {
49 } 49 text: qsTr("Enabled")
50 50
51 // Row 2 51 Layout.alignment: Qt.AlignHCenter
52 }
52 53
53 Button { 54 TitleLabel {
54 text: qsTr("Button") 55 text: qsTr("Disabled")
55 }
56 56
57 Button { 57 Layout.alignment: Qt.AlignHCenter
58 text: qsTr("Button") 58 }
59 enabled: false
60 }
61 59
62 // Row 3 60 // Row 2
63 61
64 Button { 62 Button {
65 text: qsTr("Checked") 63 text: qsTr("Button")
66 checkable: false 64 }
67 checked: true
68 }
69 65
70 Button { 66 Button {
71 text: qsTr("Checked") 67 text: qsTr("Button")
72 checkable: false 68 enabled: false
73 checked: true 69 }
74 enabled: false
75 }
76 70
77 // Row 4 71 // Row 3
78 72
79 Button { 73 Button {
80 text: qsTr("Flat") 74 text: qsTr("Checked")
81 flat: true 75 checkable: false
82 } 76 checked: true
77 }
83 78
84 Button { 79 Button {
85 text: qsTr("Flat") 80 text: qsTr("Checked")
86 flat: true 81 checkable: false
87 enabled: false 82 checked: true
88 } 83 enabled: false
84 }
89 85
90 // Row 5 86 // Row 4
91 87
92 Button { 88 Button {
93 text: qsTr("Highlighted") 89 text: qsTr("Flat")
94 highlighted: true 90 flat: true
95 } 91 }
92
93 Button {
94 text: qsTr("Flat")
95 flat: true
96 enabled: false
97 }
98
99 // Row 5
100
101 Button {
102 text: qsTr("Highlighted")
103 highlighted: true
104 }
96 105
97 Button { 106 Button {
98 text: qsTr("Highlighted") 107 text: qsTr("Highlighted")
99 highlighted: true 108 highlighted: true
100 enabled: false 109 enabled: false
110 }
101 } 111 }
102 } 112 }
103 } 113 }
diff --git a/prototype_2016/resources/qml/Pages/Basic/CheckBoxPage.qml b/prototype_2016/resources/qml/Pages/Basic/CheckBoxPage.qml
index bf5c96a..6e53e73 100644
--- a/prototype_2016/resources/qml/Pages/Basic/CheckBoxPage.qml
+++ b/prototype_2016/resources/qml/Pages/Basic/CheckBoxPage.qml
@@ -1,8 +1,8 @@
1/* 1/*
2 * This file is part of Fluid. 2 * This file is part of Fluid.
3 * 3 *
4 * Copyright (C) 2016 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> 4 * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 * Copyright (C) 2016 Michael Spencer <sonrisesoftware@gmail.com> 5 * Copyright (C) 2017 Michael Spencer <sonrisesoftware@gmail.com>
6 * 6 *
7 * $BEGIN_LICENSE:MPL2$ 7 * $BEGIN_LICENSE:MPL2$
8 * 8 *
@@ -19,71 +19,81 @@ import QtQuick.Layouts 1.0
19import Fluid.Controls 1.0 19import Fluid.Controls 1.0
20import "../.." 20import "../.."
21 21
22ColumnLayout { 22Flickable {
23 Repeater { 23 clip: true
24 model: 2 24 contentHeight: Math.max(layout.implicitHeight, height)
25 25
26 StyledRectangle { 26 ScrollBar.vertical: ScrollBar {}
27 Layout.fillWidth: true
28 Layout.fillHeight: true
29 Layout.minimumWidth: grid.width + 80
30 Layout.minimumHeight: grid.height + 80
31 27
32 GridLayout { 28 ColumnLayout {
33 id: grid 29 id: layout
34 anchors.centerIn: parent 30 anchors.fill: parent
35 columns: 3
36 rows: 3
37 31
38 // Row 1 32 Repeater {
33 model: 2
39 34
40 Item { 35 StyledRectangle {
41 width: 1 36 Layout.fillWidth: true
42 height: 1 37 Layout.fillHeight: true
43 } 38 Layout.minimumWidth: grid.width + 80
39 Layout.minimumHeight: grid.height + 80
44 40
45 TitleLabel { 41 GridLayout {
46 text: qsTr("Enabled") 42 id: grid
43 anchors.centerIn: parent
44 columns: 3
45 rows: 3
47 46
48 Layout.alignment: Qt.AlignHCenter 47 // Row 1
49 }
50 48
51 TitleLabel { 49 Item {
52 text: qsTr("Disabled") 50 width: 1
51 height: 1
52 }
53 53
54 Layout.alignment: Qt.AlignHCenter 54 TitleLabel {
55 } 55 text: qsTr("Enabled")
56 56
57 // Row 2 57 Layout.alignment: Qt.AlignHCenter
58 }
58 59
59 Label { 60 TitleLabel {
60 text: qsTr("On") 61 text: qsTr("Disabled")
61 }
62 62
63 CheckBox { 63 Layout.alignment: Qt.AlignHCenter
64 checked: true 64 }
65 text: qsTr("CheckBox")
66 }
67 65
68 CheckBox { 66 // Row 2
69 checked: true
70 enabled: false
71 text: qsTr("CheckBox")
72 }
73 67
74 // Row 3 68 Label {
69 text: qsTr("On")
70 }
75 71
76 Label { 72 CheckBox {
77 text: qsTr("Off") 73 checked: true
78 } 74 text: qsTr("CheckBox")
75 }
79 76
80 CheckBox { 77 CheckBox {
81 text: qsTr("CheckBox") 78 checked: true
82 } 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 }
83 92
84 CheckBox { 93 CheckBox {
85 text: qsTr("CheckBox") 94 text: qsTr("CheckBox")
86 enabled: false 95 enabled: false
96 }
87 } 97 }
88 } 98 }
89 } 99 }
diff --git a/prototype_2016/resources/qml/Pages/Basic/ProgressBarPage.qml b/prototype_2016/resources/qml/Pages/Basic/ProgressBarPage.qml
index 77267fe..440db51 100644
--- a/prototype_2016/resources/qml/Pages/Basic/ProgressBarPage.qml
+++ b/prototype_2016/resources/qml/Pages/Basic/ProgressBarPage.qml
@@ -1,7 +1,7 @@
1/* 1/*
2 * This file is part of Fluid. 2 * This file is part of Fluid.
3 * 3 *
4 * Copyright (C) 2016 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> 4 * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 * 5 *
6 * $BEGIN_LICENSE:MPL2$ 6 * $BEGIN_LICENSE:MPL2$
7 * 7 *
@@ -18,96 +18,106 @@ import QtQuick.Layouts 1.0
18import Fluid.Controls 1.0 18import Fluid.Controls 1.0
19import "../.." 19import "../.."
20 20
21ColumnLayout { 21Flickable {
22 Repeater { 22 clip: true
23 model: 2 23 contentHeight: Math.max(layout.implicitHeight, height)
24 24
25 StyledRectangle { 25 ScrollBar.vertical: ScrollBar {}
26 Layout.fillWidth: true
27 Layout.fillHeight: true
28 Layout.minimumWidth: grid.width + 80
29 Layout.minimumHeight: grid.height + 80
30 26
31 GridLayout { 27 ColumnLayout {
32 id: grid 28 id: layout
33 anchors.centerIn: parent 29 anchors.fill: parent
34 columns: 3
35 30
36 // Row 1 31 Repeater {
32 model: 2
37 33
38 Item { 34 StyledRectangle {
39 width: 1 35 Layout.fillWidth: true
40 height: 1 36 Layout.fillHeight: true
41 } 37 Layout.minimumWidth: grid.width + 80
38 Layout.minimumHeight: grid.height + 80
42 39
43 TitleLabel { 40 GridLayout {
44 text: qsTr("Determinate") 41 id: grid
42 anchors.centerIn: parent
43 columns: 3
45 44
46 Layout.alignment: Qt.AlignHCenter 45 // Row 1
47 }
48 46
49 TitleLabel { 47 Item {
50 text: qsTr("Indeterminate") 48 width: 1
49 height: 1
50 }
51 51
52 Layout.alignment: Qt.AlignHCenter 52 TitleLabel {
53 } 53 text: qsTr("Determinate")
54 54
55 // Row 2 55 Layout.alignment: Qt.AlignHCenter
56 }
56 57
57 Label { 58 TitleLabel {
58 text: qsTr("Static") 59 text: qsTr("Indeterminate")
59 }
60 60
61 ProgressBar { 61 Layout.alignment: Qt.AlignHCenter
62 from: 0.0 62 }
63 to: 1.0
64 value: 0.5
65 indeterminate: false
66 }
67 63
68 ProgressBar { 64 // Row 2
69 from: 0.0
70 to: 1.0
71 value: 0.5
72 indeterminate: true
73 }
74 65
75 // Row 3 66 Label {
67 text: qsTr("Static")
68 }
76 69
77 Label { 70 ProgressBar {
78 text: qsTr("Animated") 71 from: 0.0
79 } 72 to: 1.0
73 value: 0.5
74 indeterminate: false
75 }
80 76
81 ProgressBar { 77 ProgressBar {
82 from: 0.0 78 from: 0.0
83 to: 1.0 79 to: 1.0
84 indeterminate: false 80 value: 0.5
81 indeterminate: true
82 }
85 83
86 SequentialAnimation on value { 84 // Row 3
87 running: true
88 loops: NumberAnimation.Infinite
89 85
90 NumberAnimation { 86 Label {
91 from: 0.0 87 text: qsTr("Animated")
92 to: 1.0 88 }
93 duration: 3000 89
90 ProgressBar {
91 from: 0.0
92 to: 1.0
93 indeterminate: false
94
95 SequentialAnimation on value {
96 running: true
97 loops: NumberAnimation.Infinite
98
99 NumberAnimation {
100 from: 0.0
101 to: 1.0
102 duration: 3000
103 }
94 } 104 }
95 } 105 }
96 }
97 106
98 ProgressBar { 107 ProgressBar {
99 from: 0.0 108 from: 0.0
100 to: 1.0 109 to: 1.0
101 indeterminate: true 110 indeterminate: true
102 111
103 SequentialAnimation on value { 112 SequentialAnimation on value {
104 running: true 113 running: true
105 loops: NumberAnimation.Infinite 114 loops: NumberAnimation.Infinite
106 115
107 NumberAnimation { 116 NumberAnimation {
108 from: 0.0 117 from: 0.0
109 to: 1.0 118 to: 1.0
110 duration: 3000 119 duration: 3000
120 }
111 } 121 }
112 } 122 }
113 } 123 }
diff --git a/prototype_2016/resources/qml/Pages/Basic/RadioButtonPage.qml b/prototype_2016/resources/qml/Pages/Basic/RadioButtonPage.qml
index 90c187f..80c98d5 100644
--- a/prototype_2016/resources/qml/Pages/Basic/RadioButtonPage.qml
+++ b/prototype_2016/resources/qml/Pages/Basic/RadioButtonPage.qml
@@ -1,7 +1,7 @@
1/* 1/*
2 * This file is part of Fluid. 2 * This file is part of Fluid.
3 * 3 *
4 * Copyright (C) 2016 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> 4 * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 * 5 *
6 * $BEGIN_LICENSE:MPL2$ 6 * $BEGIN_LICENSE:MPL2$
7 * 7 *
@@ -18,71 +18,81 @@ import QtQuick.Layouts 1.0
18import Fluid.Controls 1.0 18import Fluid.Controls 1.0
19import "../.." 19import "../.."
20 20
21ColumnLayout { 21Flickable {
22 Repeater { 22 clip: true
23 model: 2 23 contentHeight: Math.max(layout.implicitHeight, height)
24 24
25 StyledRectangle { 25 ScrollBar.vertical: ScrollBar {}
26 Layout.fillWidth: true
27 Layout.fillHeight: true
28 Layout.minimumWidth: grid.width + 80
29 Layout.minimumHeight: grid.height + 80
30 26
31 GridLayout { 27 ColumnLayout {
32 id: grid 28 id: layout
33 anchors.centerIn: parent 29 anchors.fill: parent
34 columns: 3
35 rows: 3
36 30
37 // Row 1 31 Repeater {
32 model: 2
38 33
39 Item { 34 StyledRectangle {
40 width: 1 35 Layout.fillWidth: true
41 height: 1 36 Layout.fillHeight: true
42 } 37 Layout.minimumWidth: grid.width + 80
38 Layout.minimumHeight: grid.height + 80
43 39
44 TitleLabel { 40 GridLayout {
45 text: qsTr("Enabled") 41 id: grid
42 anchors.centerIn: parent
43 columns: 3
44 rows: 3
46 45
47 Layout.alignment: Qt.AlignHCenter 46 // Row 1
48 }
49 47
50 TitleLabel { 48 Item {
51 text: qsTr("Disabled") 49 width: 1
50 height: 1
51 }
52 52
53 Layout.alignment: Qt.AlignHCenter 53 TitleLabel {
54 } 54 text: qsTr("Enabled")
55 55
56 // Row 2 56 Layout.alignment: Qt.AlignHCenter
57 }
57 58
58 Label { 59 TitleLabel {
59 text: qsTr("On") 60 text: qsTr("Disabled")
60 }
61 61
62 RadioButton { 62 Layout.alignment: Qt.AlignHCenter
63 checked: true 63 }
64 text: qsTr("RadioButton")
65 }
66 64
67 RadioButton { 65 // Row 2
68 checked: true
69 enabled: false
70 text: qsTr("RadioButton")
71 }
72 66
73 // Row 3 67 Label {
68 text: qsTr("On")
69 }
74 70
75 Label { 71 RadioButton {
76 text: qsTr("Off") 72 checked: true
77 } 73 text: qsTr("RadioButton")
74 }
78 75
79 RadioButton { 76 RadioButton {
80 text: qsTr("RadioButton") 77 checked: true
81 } 78 enabled: false
79 text: qsTr("RadioButton")
80 }
81
82 // Row 3
83
84 Label {
85 text: qsTr("Off")
86 }
87
88 RadioButton {
89 text: qsTr("RadioButton")
90 }
82 91
83 RadioButton { 92 RadioButton {
84 text: qsTr("RadioButton") 93 text: qsTr("RadioButton")
85 enabled: false 94 enabled: false
95 }
86 } 96 }
87 } 97 }
88 } 98 }
diff --git a/prototype_2016/resources/qml/Pages/Basic/SliderPage.qml b/prototype_2016/resources/qml/Pages/Basic/SliderPage.qml
index 840e3b8..72d9c11 100644
--- a/prototype_2016/resources/qml/Pages/Basic/SliderPage.qml
+++ b/prototype_2016/resources/qml/Pages/Basic/SliderPage.qml
@@ -1,7 +1,7 @@
1/* 1/*
2 * This file is part of Fluid. 2 * This file is part of Fluid.
3 * 3 *
4 * Copyright (C) 2016 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> 4 * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 * 5 *
6 * $BEGIN_LICENSE:MPL2$ 6 * $BEGIN_LICENSE:MPL2$
7 * 7 *
@@ -18,123 +18,133 @@ import QtQuick.Layouts 1.0
18import Fluid.Controls 1.0 18import Fluid.Controls 1.0
19import "../.." 19import "../.."
20 20
21ColumnLayout { 21Flickable {
22 Repeater { 22 clip: true
23 model: 2 23 contentHeight: Math.max(layout.implicitHeight, height)
24 24
25 StyledRectangle { 25 ScrollBar.vertical: ScrollBar {}
26 Layout.fillWidth: true 26
27 Layout.fillHeight: true 27 ColumnLayout {
28 Layout.minimumWidth: grid.width + 80 28 id: layout
29 Layout.minimumHeight: grid.height + 80 29 anchors.fill: parent
30 30
31 GridLayout { 31 Repeater {
32 id: grid 32 model: 2
33 anchors.centerIn: parent 33
34 columns: 3 34 StyledRectangle {
35 rows: 3 35 Layout.fillWidth: true
36 36 Layout.fillHeight: true
37 // Row 1 37 Layout.minimumWidth: grid.width + 80
38 38 Layout.minimumHeight: grid.height + 80
39 Item { 39
40 width: 1 40 GridLayout {
41 height: 1 41 id: grid
42 } 42 anchors.centerIn: parent
43 43 columns: 3
44 TitleLabel { 44 rows: 3
45 text: qsTr("Enabled") 45
46 46 // Row 1
47 Layout.alignment: Qt.AlignHCenter 47
48 } 48 Item {
49 49 width: 1
50 TitleLabel { 50 height: 1
51 text: qsTr("Disabled") 51 }
52 52
53 Layout.alignment: Qt.AlignHCenter 53 TitleLabel {
54 } 54 text: qsTr("Enabled")
55 55
56 // Row 2 56 Layout.alignment: Qt.AlignHCenter
57 57 }
58 Label { 58
59 text: qsTr("Horizontal / Single") 59 TitleLabel {
60 } 60 text: qsTr("Disabled")
61 61
62 Slider { 62 Layout.alignment: Qt.AlignHCenter
63 from: 0.0 63 }
64 to: 1.0 64
65 value: 0.5 65 // Row 2
66 } 66
67 67 Label {
68 Slider { 68 text: qsTr("Horizontal / Single")
69 from: 0.0 69 }
70 to: 1.0 70
71 value: 0.5 71 Slider {
72 enabled: false 72 from: 0.0
73 } 73 to: 1.0
74 74 value: 0.5
75 // Row 3 75 }
76 76
77 Label { 77 Slider {
78 text: qsTr("Horizontal / Range") 78 from: 0.0
79 } 79 to: 1.0
80 80 value: 0.5
81 RangeSlider { 81 enabled: false
82 from: 0.0 82 }
83 to: 1.0 83
84 first.value: 0.4 84 // Row 3
85 second.value: 0.6 85
86 } 86 Label {
87 87 text: qsTr("Horizontal / Range")
88 RangeSlider { 88 }
89 from: 0.0 89
90 to: 1.0 90 RangeSlider {
91 first.value: 0.4 91 from: 0.0
92 second.value: 0.6 92 to: 1.0
93 enabled: false 93 first.value: 0.4
94 } 94 second.value: 0.6
95 95 }
96 // Row 4 96
97 97 RangeSlider {
98 Label { 98 from: 0.0
99 text: qsTr("Vertical / Single") 99 to: 1.0
100 } 100 first.value: 0.4
101 101 second.value: 0.6
102 Slider { 102 enabled: false
103 from: 0.0 103 }
104 to: 1.0 104
105 value: 0.5 105 // Row 4
106 orientation: Qt.Vertical 106
107 } 107 Label {
108 108 text: qsTr("Vertical / Single")
109 Slider { 109 }
110 from: 0.0 110
111 to: 1.0 111 Slider {
112 value: 0.5 112 from: 0.0
113 enabled: false 113 to: 1.0
114 orientation: Qt.Vertical 114 value: 0.5
115 } 115 orientation: Qt.Vertical
116 116 }
117 // Row 5 117
118 118 Slider {
119 Label { 119 from: 0.0
120 text: qsTr("Vertical / Range") 120 to: 1.0
121 } 121 value: 0.5
122 122 enabled: false
123 RangeSlider { 123 orientation: Qt.Vertical
124 from: 0.0 124 }
125 to: 1.0 125
126 first.value: 0.4 126 // Row 5
127 second.value: 0.6 127
128 orientation: Qt.Vertical 128 Label {
129 } 129 text: qsTr("Vertical / Range")
130 130 }
131 RangeSlider { 131
132 from: 0.0 132 RangeSlider {
133 to: 1.0 133 from: 0.0
134 first.value: 0.4 134 to: 1.0
135 second.value: 0.6 135 first.value: 0.4
136 enabled: false 136 second.value: 0.6
137 orientation: Qt.Vertical 137 orientation: Qt.Vertical
138 }
139
140 RangeSlider {
141 from: 0.0
142 to: 1.0
143 first.value: 0.4
144 second.value: 0.6
145 enabled: false
146 orientation: Qt.Vertical
147 }
138 } 148 }
139 } 149 }
140 } 150 }
diff --git a/prototype_2016/resources/qml/Pages/Basic/SwitchPage.qml b/prototype_2016/resources/qml/Pages/Basic/SwitchPage.qml
index abbd9ac..15c679b 100644
--- a/prototype_2016/resources/qml/Pages/Basic/SwitchPage.qml
+++ b/prototype_2016/resources/qml/Pages/Basic/SwitchPage.qml
@@ -1,7 +1,7 @@
1/* 1/*
2 * This file is part of Fluid. 2 * This file is part of Fluid.
3 * 3 *
4 * Copyright (C) 2016 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> 4 * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
5 * 5 *
6 * $BEGIN_LICENSE:MPL2$ 6 * $BEGIN_LICENSE:MPL2$
7 * 7 *
@@ -18,71 +18,81 @@ import QtQuick.Layouts 1.0
18import Fluid.Controls 1.0 18import Fluid.Controls 1.0
19import "../.." 19import "../.."
20 20
21ColumnLayout { 21Flickable {
22 Repeater { 22 clip: true
23 model: 2 23 contentHeight: Math.max(layout.implicitHeight, height)
24 24
25 StyledRectangle { 25 ScrollBar.vertical: ScrollBar {}
26 Layout.fillWidth: true
27 Layout.fillHeight: true
28 Layout.minimumWidth: grid.width + 80
29 Layout.minimumHeight: grid.height + 80
30 26
31 GridLayout { 27 ColumnLayout {
32 id: grid 28 id: layout
33 anchors.centerIn: parent 29 anchors.fill: parent
34 columns: 3
35 rows: 3
36 30
37 // Row 1 31 Repeater {
32 model: 2
38 33
39 Item { 34 StyledRectangle {
40 width: 1 35 Layout.fillWidth: true
41 height: 1 36 Layout.fillHeight: true
42 } 37 Layout.minimumWidth: grid.width + 80
38 Layout.minimumHeight: grid.height + 80
43 39
44 TitleLabel { 40 GridLayout {
45 text: qsTr("Enabled") 41 id: grid
42 anchors.centerIn: parent
43 columns: 3
44 rows: 3
46 45
47 Layout.alignment: Qt.AlignHCenter 46 // Row 1
48 }
49 47
50 TitleLabel { 48 Item {
51 text: qsTr("Disabled") 49 width: 1
50 height: 1
51 }
52 52
53 Layout.alignment: Qt.AlignHCenter 53 TitleLabel {
54 } 54 text: qsTr("Enabled")
55 55
56 // Row 2 56 Layout.alignment: Qt.AlignHCenter
57 }
57 58
58 Label { 59 TitleLabel {
59 text: qsTr("On") 60 text: qsTr("Disabled")
60 }
61 61
62 Switch { 62 Layout.alignment: Qt.AlignHCenter
63 checked: true 63 }
64 text: qsTr("Switch")
65 }
66 64
67 Switch { 65 // Row 2
68 checked: true
69 enabled: false
70 text: qsTr("Switch")
71 }
72 66
73 // Row 3 67 Label {
68 text: qsTr("On")
69 }
74 70
75 Label { 71 Switch {
76 text: qsTr("Off") 72 checked: true
77 } 73 text: qsTr("Switch")
74 }
78 75
79 Switch { 76 Switch {
80 text: qsTr("Switch") 77 checked: true
81 } 78 enabled: false
79 text: qsTr("Switch")
80 }
81
82 // Row 3
83
84 Label {
85 text: qsTr("Off")
86 }
87
88 Switch {
89 text: qsTr("Switch")
90 }
82 91
83 Switch { 92 Switch {
84 text: qsTr("Switch") 93 text: qsTr("Switch")
85 enabled: false 94 enabled: false
95 }
86 } 96 }
87 } 97 }
88 } 98 }