diff options
Diffstat (limited to 'prototype_2016/resources/qml/Pages')
17 files changed, 1446 insertions, 0 deletions
diff --git a/prototype_2016/resources/qml/Pages/Basic/BusyIndicatorPage.qml b/prototype_2016/resources/qml/Pages/Basic/BusyIndicatorPage.qml new file mode 100644 index 0000000..1a6341e --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Basic/BusyIndicatorPage.qml | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Controls 2.0 | ||
17 | import QtQuick.Layouts 1.0 | ||
18 | import "../.." | ||
19 | |||
20 | Flickable { | ||
21 | clip: true | ||
22 | contentHeight: Math.max(layout.implicitHeight, height) | ||
23 | |||
24 | ScrollBar.vertical: ScrollBar {} | ||
25 | |||
26 | ColumnLayout { | ||
27 | id: layout | ||
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 | } | ||
41 | } | ||
42 | } | ||
43 | } | ||
44 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Basic/ButtonPage.qml b/prototype_2016/resources/qml/Pages/Basic/ButtonPage.qml new file mode 100644 index 0000000..6cf94fe --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Basic/ButtonPage.qml | |||
@@ -0,0 +1,115 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Controls 2.0 | ||
17 | import QtQuick.Layouts 1.0 | ||
18 | import Fluid.Controls 1.0 | ||
19 | import "../.." | ||
20 | |||
21 | Flickable { | ||
22 | clip: true | ||
23 | contentHeight: Math.max(layout.implicitHeight, height) | ||
24 | |||
25 | ScrollBar.vertical: ScrollBar {} | ||
26 | |||
27 | ColumnLayout { | ||
28 | id: layout | ||
29 | anchors.fill: parent | ||
30 | |||
31 | Repeater { | ||
32 | model: 2 | ||
33 | |||
34 | StyledRectangle { | ||
35 | Layout.fillWidth: true | ||
36 | Layout.fillHeight: true | ||
37 | Layout.minimumWidth: grid.width + 80 | ||
38 | Layout.minimumHeight: grid.height + 80 | ||
39 | |||
40 | GridLayout { | ||
41 | id: grid | ||
42 | anchors.centerIn: parent | ||
43 | columns: 2 | ||
44 | rows: 4 | ||
45 | |||
46 | // Row 1 | ||
47 | |||
48 | TitleLabel { | ||
49 | text: qsTr("Enabled") | ||
50 | |||
51 | Layout.alignment: Qt.AlignHCenter | ||
52 | } | ||
53 | |||
54 | TitleLabel { | ||
55 | text: qsTr("Disabled") | ||
56 | |||
57 | Layout.alignment: Qt.AlignHCenter | ||
58 | } | ||
59 | |||
60 | // Row 2 | ||
61 | |||
62 | Button { | ||
63 | text: qsTr("Button") | ||
64 | } | ||
65 | |||
66 | Button { | ||
67 | text: qsTr("Button") | ||
68 | enabled: false | ||
69 | } | ||
70 | |||
71 | // Row 3 | ||
72 | |||
73 | Button { | ||
74 | text: qsTr("Checked") | ||
75 | checkable: false | ||
76 | checked: true | ||
77 | } | ||
78 | |||
79 | Button { | ||
80 | text: qsTr("Checked") | ||
81 | checkable: false | ||
82 | checked: true | ||
83 | enabled: false | ||
84 | } | ||
85 | |||
86 | // Row 4 | ||
87 | |||
88 | Button { | ||
89 | text: qsTr("Flat") | ||
90 | flat: true | ||
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 | } | ||
105 | |||
106 | Button { | ||
107 | text: qsTr("Highlighted") | ||
108 | highlighted: true | ||
109 | enabled: false | ||
110 | } | ||
111 | } | ||
112 | } | ||
113 | } | ||
114 | } | ||
115 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Basic/CheckBoxPage.qml b/prototype_2016/resources/qml/Pages/Basic/CheckBoxPage.qml new file mode 100644 index 0000000..6e53e73 --- /dev/null +++ b/prototype_2016/resources/qml/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 | |||
16 | import QtQuick 2.0 | ||
17 | import QtQuick.Controls 2.0 | ||
18 | import QtQuick.Layouts 1.0 | ||
19 | import Fluid.Controls 1.0 | ||
20 | import "../.." | ||
21 | |||
22 | Flickable { | ||
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 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Basic/ProgressBarPage.qml b/prototype_2016/resources/qml/Pages/Basic/ProgressBarPage.qml new file mode 100644 index 0000000..440db51 --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Basic/ProgressBarPage.qml | |||
@@ -0,0 +1,127 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Controls 2.0 | ||
17 | import QtQuick.Layouts 1.0 | ||
18 | import Fluid.Controls 1.0 | ||
19 | import "../.." | ||
20 | |||
21 | Flickable { | ||
22 | clip: true | ||
23 | contentHeight: Math.max(layout.implicitHeight, height) | ||
24 | |||
25 | ScrollBar.vertical: ScrollBar {} | ||
26 | |||
27 | ColumnLayout { | ||
28 | id: layout | ||
29 | anchors.fill: parent | ||
30 | |||
31 | Repeater { | ||
32 | model: 2 | ||
33 | |||
34 | StyledRectangle { | ||
35 | Layout.fillWidth: true | ||
36 | Layout.fillHeight: true | ||
37 | Layout.minimumWidth: grid.width + 80 | ||
38 | Layout.minimumHeight: grid.height + 80 | ||
39 | |||
40 | GridLayout { | ||
41 | id: grid | ||
42 | anchors.centerIn: parent | ||
43 | columns: 3 | ||
44 | |||
45 | // Row 1 | ||
46 | |||
47 | Item { | ||
48 | width: 1 | ||
49 | height: 1 | ||
50 | } | ||
51 | |||
52 | TitleLabel { | ||
53 | text: qsTr("Determinate") | ||
54 | |||
55 | Layout.alignment: Qt.AlignHCenter | ||
56 | } | ||
57 | |||
58 | TitleLabel { | ||
59 | text: qsTr("Indeterminate") | ||
60 | |||
61 | Layout.alignment: Qt.AlignHCenter | ||
62 | } | ||
63 | |||
64 | // Row 2 | ||
65 | |||
66 | Label { | ||
67 | text: qsTr("Static") | ||
68 | } | ||
69 | |||
70 | ProgressBar { | ||
71 | from: 0.0 | ||
72 | to: 1.0 | ||
73 | value: 0.5 | ||
74 | indeterminate: false | ||
75 | } | ||
76 | |||
77 | ProgressBar { | ||
78 | from: 0.0 | ||
79 | to: 1.0 | ||
80 | value: 0.5 | ||
81 | indeterminate: true | ||
82 | } | ||
83 | |||
84 | // Row 3 | ||
85 | |||
86 | Label { | ||
87 | text: qsTr("Animated") | ||
88 | } | ||
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 | } | ||
104 | } | ||
105 | } | ||
106 | |||
107 | ProgressBar { | ||
108 | from: 0.0 | ||
109 | to: 1.0 | ||
110 | indeterminate: true | ||
111 | |||
112 | SequentialAnimation on value { | ||
113 | running: true | ||
114 | loops: NumberAnimation.Infinite | ||
115 | |||
116 | NumberAnimation { | ||
117 | from: 0.0 | ||
118 | to: 1.0 | ||
119 | duration: 3000 | ||
120 | } | ||
121 | } | ||
122 | } | ||
123 | } | ||
124 | } | ||
125 | } | ||
126 | } | ||
127 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Basic/RadioButtonPage.qml b/prototype_2016/resources/qml/Pages/Basic/RadioButtonPage.qml new file mode 100644 index 0000000..80c98d5 --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Basic/RadioButtonPage.qml | |||
@@ -0,0 +1,100 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Controls 2.0 | ||
17 | import QtQuick.Layouts 1.0 | ||
18 | import Fluid.Controls 1.0 | ||
19 | import "../.." | ||
20 | |||
21 | Flickable { | ||
22 | clip: true | ||
23 | contentHeight: Math.max(layout.implicitHeight, height) | ||
24 | |||
25 | ScrollBar.vertical: ScrollBar {} | ||
26 | |||
27 | ColumnLayout { | ||
28 | id: layout | ||
29 | anchors.fill: parent | ||
30 | |||
31 | Repeater { | ||
32 | model: 2 | ||
33 | |||
34 | StyledRectangle { | ||
35 | Layout.fillWidth: true | ||
36 | Layout.fillHeight: true | ||
37 | Layout.minimumWidth: grid.width + 80 | ||
38 | Layout.minimumHeight: grid.height + 80 | ||
39 | |||
40 | GridLayout { | ||
41 | id: grid | ||
42 | anchors.centerIn: parent | ||
43 | columns: 3 | ||
44 | rows: 3 | ||
45 | |||
46 | // Row 1 | ||
47 | |||
48 | Item { | ||
49 | width: 1 | ||
50 | height: 1 | ||
51 | } | ||
52 | |||
53 | TitleLabel { | ||
54 | text: qsTr("Enabled") | ||
55 | |||
56 | Layout.alignment: Qt.AlignHCenter | ||
57 | } | ||
58 | |||
59 | TitleLabel { | ||
60 | text: qsTr("Disabled") | ||
61 | |||
62 | Layout.alignment: Qt.AlignHCenter | ||
63 | } | ||
64 | |||
65 | // Row 2 | ||
66 | |||
67 | Label { | ||
68 | text: qsTr("On") | ||
69 | } | ||
70 | |||
71 | RadioButton { | ||
72 | checked: true | ||
73 | text: qsTr("RadioButton") | ||
74 | } | ||
75 | |||
76 | RadioButton { | ||
77 | checked: true | ||
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 | } | ||
91 | |||
92 | RadioButton { | ||
93 | text: qsTr("RadioButton") | ||
94 | enabled: false | ||
95 | } | ||
96 | } | ||
97 | } | ||
98 | } | ||
99 | } | ||
100 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Basic/SliderPage.qml b/prototype_2016/resources/qml/Pages/Basic/SliderPage.qml new file mode 100644 index 0000000..72d9c11 --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Basic/SliderPage.qml | |||
@@ -0,0 +1,152 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Controls 2.0 | ||
17 | import QtQuick.Layouts 1.0 | ||
18 | import Fluid.Controls 1.0 | ||
19 | import "../.." | ||
20 | |||
21 | Flickable { | ||
22 | clip: true | ||
23 | contentHeight: Math.max(layout.implicitHeight, height) | ||
24 | |||
25 | ScrollBar.vertical: ScrollBar {} | ||
26 | |||
27 | ColumnLayout { | ||
28 | id: layout | ||
29 | anchors.fill: parent | ||
30 | |||
31 | Repeater { | ||
32 | model: 2 | ||
33 | |||
34 | StyledRectangle { | ||
35 | Layout.fillWidth: true | ||
36 | Layout.fillHeight: true | ||
37 | Layout.minimumWidth: grid.width + 80 | ||
38 | Layout.minimumHeight: grid.height + 80 | ||
39 | |||
40 | GridLayout { | ||
41 | id: grid | ||
42 | anchors.centerIn: parent | ||
43 | columns: 3 | ||
44 | rows: 3 | ||
45 | |||
46 | // Row 1 | ||
47 | |||
48 | Item { | ||
49 | width: 1 | ||
50 | height: 1 | ||
51 | } | ||
52 | |||
53 | TitleLabel { | ||
54 | text: qsTr("Enabled") | ||
55 | |||
56 | Layout.alignment: Qt.AlignHCenter | ||
57 | } | ||
58 | |||
59 | TitleLabel { | ||
60 | text: qsTr("Disabled") | ||
61 | |||
62 | Layout.alignment: Qt.AlignHCenter | ||
63 | } | ||
64 | |||
65 | // Row 2 | ||
66 | |||
67 | Label { | ||
68 | text: qsTr("Horizontal / Single") | ||
69 | } | ||
70 | |||
71 | Slider { | ||
72 | from: 0.0 | ||
73 | to: 1.0 | ||
74 | value: 0.5 | ||
75 | } | ||
76 | |||
77 | Slider { | ||
78 | from: 0.0 | ||
79 | to: 1.0 | ||
80 | value: 0.5 | ||
81 | enabled: false | ||
82 | } | ||
83 | |||
84 | // Row 3 | ||
85 | |||
86 | Label { | ||
87 | text: qsTr("Horizontal / Range") | ||
88 | } | ||
89 | |||
90 | RangeSlider { | ||
91 | from: 0.0 | ||
92 | to: 1.0 | ||
93 | first.value: 0.4 | ||
94 | second.value: 0.6 | ||
95 | } | ||
96 | |||
97 | RangeSlider { | ||
98 | from: 0.0 | ||
99 | to: 1.0 | ||
100 | first.value: 0.4 | ||
101 | second.value: 0.6 | ||
102 | enabled: false | ||
103 | } | ||
104 | |||
105 | // Row 4 | ||
106 | |||
107 | Label { | ||
108 | text: qsTr("Vertical / Single") | ||
109 | } | ||
110 | |||
111 | Slider { | ||
112 | from: 0.0 | ||
113 | to: 1.0 | ||
114 | value: 0.5 | ||
115 | orientation: Qt.Vertical | ||
116 | } | ||
117 | |||
118 | Slider { | ||
119 | from: 0.0 | ||
120 | to: 1.0 | ||
121 | value: 0.5 | ||
122 | enabled: false | ||
123 | orientation: Qt.Vertical | ||
124 | } | ||
125 | |||
126 | // Row 5 | ||
127 | |||
128 | Label { | ||
129 | text: qsTr("Vertical / Range") | ||
130 | } | ||
131 | |||
132 | RangeSlider { | ||
133 | from: 0.0 | ||
134 | to: 1.0 | ||
135 | first.value: 0.4 | ||
136 | second.value: 0.6 | ||
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 | } | ||
148 | } | ||
149 | } | ||
150 | } | ||
151 | } | ||
152 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Basic/SwitchPage.qml b/prototype_2016/resources/qml/Pages/Basic/SwitchPage.qml new file mode 100644 index 0000000..15c679b --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Basic/SwitchPage.qml | |||
@@ -0,0 +1,100 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Controls 2.0 | ||
17 | import QtQuick.Layouts 1.0 | ||
18 | import Fluid.Controls 1.0 | ||
19 | import "../.." | ||
20 | |||
21 | Flickable { | ||
22 | clip: true | ||
23 | contentHeight: Math.max(layout.implicitHeight, height) | ||
24 | |||
25 | ScrollBar.vertical: ScrollBar {} | ||
26 | |||
27 | ColumnLayout { | ||
28 | id: layout | ||
29 | anchors.fill: parent | ||
30 | |||
31 | Repeater { | ||
32 | model: 2 | ||
33 | |||
34 | StyledRectangle { | ||
35 | Layout.fillWidth: true | ||
36 | Layout.fillHeight: true | ||
37 | Layout.minimumWidth: grid.width + 80 | ||
38 | Layout.minimumHeight: grid.height + 80 | ||
39 | |||
40 | GridLayout { | ||
41 | id: grid | ||
42 | anchors.centerIn: parent | ||
43 | columns: 3 | ||
44 | rows: 3 | ||
45 | |||
46 | // Row 1 | ||
47 | |||
48 | Item { | ||
49 | width: 1 | ||
50 | height: 1 | ||
51 | } | ||
52 | |||
53 | TitleLabel { | ||
54 | text: qsTr("Enabled") | ||
55 | |||
56 | Layout.alignment: Qt.AlignHCenter | ||
57 | } | ||
58 | |||
59 | TitleLabel { | ||
60 | text: qsTr("Disabled") | ||
61 | |||
62 | Layout.alignment: Qt.AlignHCenter | ||
63 | } | ||
64 | |||
65 | // Row 2 | ||
66 | |||
67 | Label { | ||
68 | text: qsTr("On") | ||
69 | } | ||
70 | |||
71 | Switch { | ||
72 | checked: true | ||
73 | text: qsTr("Switch") | ||
74 | } | ||
75 | |||
76 | Switch { | ||
77 | checked: true | ||
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 | } | ||
91 | |||
92 | Switch { | ||
93 | text: qsTr("Switch") | ||
94 | enabled: false | ||
95 | } | ||
96 | } | ||
97 | } | ||
98 | } | ||
99 | } | ||
100 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Compound/CardPage.qml b/prototype_2016/resources/qml/Pages/Compound/CardPage.qml new file mode 100644 index 0000000..ec33a3e --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Compound/CardPage.qml | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Controls 2.0 | ||
17 | import Fluid.Controls 1.0 | ||
18 | |||
19 | Item { | ||
20 | Card { | ||
21 | id: card | ||
22 | anchors.centerIn: parent | ||
23 | width: 400 | ||
24 | height: 400 | ||
25 | |||
26 | Image { | ||
27 | id: picture | ||
28 | anchors { | ||
29 | left: parent.left | ||
30 | top: parent.top | ||
31 | right: parent.right | ||
32 | } | ||
33 | height: 200 | ||
34 | source: "https://www.nps.gov/yose/planyourvisit/images/glacier-point-people-960web.jpg" | ||
35 | } | ||
36 | |||
37 | Column { | ||
38 | id: column | ||
39 | anchors { | ||
40 | left: parent.left | ||
41 | top: picture.bottom | ||
42 | right: parent.right | ||
43 | margins: Units.smallSpacing * 2 | ||
44 | } | ||
45 | spacing: Units.smallSpacing * 2 | ||
46 | |||
47 | TitleLabel { | ||
48 | text: qsTr("Yosemite National Park") | ||
49 | } | ||
50 | |||
51 | BodyLabel { | ||
52 | text: qsTr("First protected in 1864, Yosemite National Park " + | ||
53 | "is best known for its waterfalls, but within its " + | ||
54 | "nearly 1,200 square miles, you can find deep " + | ||
55 | "valleys, grand meadows, ancient giant sequoias, " + | ||
56 | "a vast wilderness area, and much more.") | ||
57 | wrapMode: Text.WordWrap | ||
58 | width: parent.width | ||
59 | } | ||
60 | |||
61 | Row { | ||
62 | spacing: Units.smallSpacing | ||
63 | |||
64 | Button { | ||
65 | text: qsTr("Share") | ||
66 | flat: true | ||
67 | } | ||
68 | |||
69 | Button { | ||
70 | text: qsTr("Explore") | ||
71 | flat: true | ||
72 | } | ||
73 | } | ||
74 | } | ||
75 | } | ||
76 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Compound/InfoBarPage.qml b/prototype_2016/resources/qml/Pages/Compound/InfoBarPage.qml new file mode 100644 index 0000000..1830e39 --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Compound/InfoBarPage.qml | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Controls 2.0 | ||
17 | import Fluid.Controls 1.0 | ||
18 | |||
19 | Item { | ||
20 | Button { | ||
21 | anchors.centerIn: parent | ||
22 | text: qsTr("Open") | ||
23 | onClicked: infoBar.open(qsTr("Message sent")) | ||
24 | } | ||
25 | |||
26 | InfoBar { | ||
27 | id: infoBar | ||
28 | buttonText: qsTr("OK") | ||
29 | } | ||
30 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Compound/ListItemPage.qml b/prototype_2016/resources/qml/Pages/Compound/ListItemPage.qml new file mode 100644 index 0000000..f86f81b --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Compound/ListItemPage.qml | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Controls 2.0 | ||
17 | import Fluid.Controls 1.0 | ||
18 | import "../.." | ||
19 | |||
20 | Page { | ||
21 | ListView { | ||
22 | anchors.fill: parent | ||
23 | model: ListModel { | ||
24 | ListElement { title: "List Item 1"; source: "qrc:/Pages/Compound/SubPage.qml" } | ||
25 | ListElement { title: "List Item 2"; source: "qrc:/Pages/Compound/SubPage.qml" } | ||
26 | ListElement { title: "List Item 3"; source: "qrc:/Pages/Compound/SubPage.qml" } | ||
27 | ListElement { title: "List Item 4"; source: "qrc:/Pages/Compound/SubPage.qml" } | ||
28 | ListElement { title: "List Item 5"; source: "qrc:/Pages/Compound/SubPage.qml" } | ||
29 | } | ||
30 | header: Subheader { | ||
31 | text: "Header" | ||
32 | } | ||
33 | delegate: ListItem { | ||
34 | text: model.title | ||
35 | onClicked: pageStack.push(model.source) | ||
36 | } | ||
37 | |||
38 | ScrollIndicator.vertical: ScrollIndicator {} | ||
39 | } | ||
40 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Compound/SubPage.qml b/prototype_2016/resources/qml/Pages/Compound/SubPage.qml new file mode 100644 index 0000000..8a86a28 --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Compound/SubPage.qml | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Michael Spencer <sonrisesoftware@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick.Controls 2.0 | ||
16 | import Fluid.Controls 1.0 | ||
17 | |||
18 | Page { | ||
19 | title: "Sub page demo" | ||
20 | |||
21 | actions: [ | ||
22 | Action { | ||
23 | iconName: "action/settings" | ||
24 | } | ||
25 | ] | ||
26 | |||
27 | Label { | ||
28 | anchors.centerIn: parent | ||
29 | text: "Testing" | ||
30 | } | ||
31 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Material/ActionButtonPage.qml b/prototype_2016/resources/qml/Pages/Material/ActionButtonPage.qml new file mode 100644 index 0000000..1fcf516 --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Material/ActionButtonPage.qml | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Controls 2.0 | ||
17 | import QtQuick.Controls.Material 2.0 | ||
18 | import Fluid.Material 1.0 | ||
19 | import "../.." | ||
20 | |||
21 | Flickable { | ||
22 | clip: true | ||
23 | contentHeight: Math.max(layout.implicitHeight, height) | ||
24 | |||
25 | ScrollBar.vertical: ScrollBar {} | ||
26 | |||
27 | Column { | ||
28 | id: layout | ||
29 | anchors.fill: parent | ||
30 | |||
31 | Repeater { | ||
32 | model: 2 | ||
33 | |||
34 | StyledRectangle { | ||
35 | //y: height * index | ||
36 | width: parent.width | ||
37 | height: parent.height / 2 | ||
38 | |||
39 | Column { | ||
40 | anchors.centerIn: parent | ||
41 | |||
42 | ActionButton { | ||
43 | iconName: "device/airplanemode_active" | ||
44 | } | ||
45 | |||
46 | ActionButton { | ||
47 | iconName: "navigation/check" | ||
48 | |||
49 | Material.elevation: 1 | ||
50 | } | ||
51 | |||
52 | ActionButton { | ||
53 | iconName: "device/airplanemode_active" | ||
54 | |||
55 | Material.background: Material.primaryColor | ||
56 | } | ||
57 | |||
58 | ActionButton { | ||
59 | iconName: "navigation/check" | ||
60 | |||
61 | Material.elevation: 1 | ||
62 | Material.background: Material.primaryColor | ||
63 | } | ||
64 | } | ||
65 | } | ||
66 | } | ||
67 | } | ||
68 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Material/WavePage.qml b/prototype_2016/resources/qml/Pages/Material/WavePage.qml new file mode 100644 index 0000000..58cae01 --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Material/WavePage.qml | |||
@@ -0,0 +1,41 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Controls 2.0 | ||
17 | import QtQuick.Controls.Material 2.0 | ||
18 | import Fluid.Controls 1.0 | ||
19 | import Fluid.Material 1.0 | ||
20 | import "../.." | ||
21 | |||
22 | Item { | ||
23 | Wave { | ||
24 | id: wave | ||
25 | initialX: parent.width - size | ||
26 | initialY: parent.height - size | ||
27 | size: 48 | ||
28 | color: Material.accentColor | ||
29 | } | ||
30 | |||
31 | Button { | ||
32 | anchors.centerIn: parent | ||
33 | text: qsTr("Toggle") | ||
34 | onClicked: { | ||
35 | if (wave.opened) | ||
36 | wave.close(parent.width - wave.size, parent.height - wave.size) | ||
37 | else | ||
38 | wave.open(0, 0) | ||
39 | } | ||
40 | } | ||
41 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Navigation/NavDrawerPage.qml b/prototype_2016/resources/qml/Pages/Navigation/NavDrawerPage.qml new file mode 100644 index 0000000..4c7dd21 --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Navigation/NavDrawerPage.qml | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Controls 2.0 | ||
17 | import Fluid.Controls 1.0 | ||
18 | import "../.." | ||
19 | |||
20 | Item { | ||
21 | Button { | ||
22 | anchors.centerIn: parent | ||
23 | text: qsTr("Open") | ||
24 | onClicked: navDrawer.open() | ||
25 | } | ||
26 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Style/PalettePage.qml b/prototype_2016/resources/qml/Pages/Style/PalettePage.qml new file mode 100644 index 0000000..bc34dab --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Style/PalettePage.qml | |||
@@ -0,0 +1,135 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Controls 2.0 | ||
17 | import QtQuick.Controls.Material 2.0 | ||
18 | import QtQuick.Layouts 1.0 | ||
19 | import Fluid.Core 1.0 | ||
20 | import Fluid.Controls 1.0 | ||
21 | import "../.." | ||
22 | |||
23 | Flickable { | ||
24 | clip: true | ||
25 | contentHeight: Math.max(grid.implicitHeight, height) | ||
26 | |||
27 | ScrollBar.vertical: ScrollBar {} | ||
28 | |||
29 | property color whiteColor: Qt.rgba(255, 255, 255, 1) | ||
30 | property color blackColor: Qt.rgba(0, 0, 0, 1) | ||
31 | |||
32 | GridLayout { | ||
33 | id: grid | ||
34 | |||
35 | anchors { | ||
36 | top: parent.top | ||
37 | bottom: parent.bottom | ||
38 | horizontalCenter: parent.horizontalCenter | ||
39 | topMargin: Units.largeSpacing | ||
40 | } | ||
41 | |||
42 | width: parent.width * 0.8 | ||
43 | |||
44 | columns: width / 300 | ||
45 | rowSpacing: Units.smallSpacing | ||
46 | columnSpacing: Units.smallSpacing | ||
47 | |||
48 | Repeater { | ||
49 | model: ListModel { | ||
50 | ListElement { | ||
51 | paletteIndex: Material.Red | ||
52 | name: "Red" | ||
53 | } | ||
54 | ListElement { | ||
55 | paletteIndex: Material.Pink | ||
56 | name: "Pink" | ||
57 | } | ||
58 | ListElement { | ||
59 | paletteIndex: Material.Purple | ||
60 | name: "Purple" | ||
61 | } | ||
62 | ListElement { | ||
63 | paletteIndex: Material.DeepPurple | ||
64 | name: "DeepPurple" | ||
65 | } | ||
66 | ListElement { | ||
67 | paletteIndex: Material.Indigo | ||
68 | name: "Indigo" | ||
69 | } | ||
70 | ListElement { | ||
71 | paletteIndex: Material.Blue | ||
72 | name: "Blue" | ||
73 | } | ||
74 | ListElement { | ||
75 | paletteIndex: Material.LightBlue | ||
76 | name: "LightBlue" | ||
77 | } | ||
78 | ListElement { | ||
79 | paletteIndex: Material.Cyan | ||
80 | name: "Cyan" | ||
81 | } | ||
82 | ListElement { | ||
83 | paletteIndex: Material.Teal | ||
84 | name: "Teal" | ||
85 | } | ||
86 | ListElement { | ||
87 | paletteIndex: Material.Green | ||
88 | name: "Green" | ||
89 | } | ||
90 | ListElement { | ||
91 | paletteIndex: Material.LightGreen | ||
92 | name: "LightGreen" | ||
93 | } | ||
94 | ListElement { | ||
95 | paletteIndex: Material.Lime | ||
96 | name: "Lime" | ||
97 | } | ||
98 | ListElement { | ||
99 | paletteIndex: Material.Yellow | ||
100 | name: "Yellow" | ||
101 | } | ||
102 | ListElement { | ||
103 | paletteIndex: Material.Amber | ||
104 | name: "Amber" | ||
105 | } | ||
106 | ListElement { | ||
107 | paletteIndex: Material.Orange | ||
108 | name: "Orange" | ||
109 | } | ||
110 | ListElement { | ||
111 | paletteIndex: Material.DeepOrange | ||
112 | name: "DeepOrange" | ||
113 | } | ||
114 | ListElement { | ||
115 | paletteIndex: Material.Grey | ||
116 | name: "Grey" | ||
117 | } | ||
118 | ListElement { | ||
119 | paletteIndex: Material.BlueGrey | ||
120 | name: "BlueGrey" | ||
121 | } | ||
122 | ListElement { | ||
123 | paletteIndex: Material.Brown | ||
124 | name: "Brown" | ||
125 | } | ||
126 | } | ||
127 | |||
128 | PaletteSwatch { | ||
129 | paletteIndex: model.paletteIndex | ||
130 | paletteName: model.name | ||
131 | paletteColor: Material.color(model.paletteIndex, Material.Shade500) | ||
132 | } | ||
133 | } | ||
134 | } | ||
135 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Style/PaletteSwatch.qml b/prototype_2016/resources/qml/Pages/Style/PaletteSwatch.qml new file mode 100644 index 0000000..ac5c9b3 --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Style/PaletteSwatch.qml | |||
@@ -0,0 +1,173 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Controls 2.0 | ||
17 | import QtQuick.Controls.Material 2.0 | ||
18 | import Fluid.Core 1.0 | ||
19 | import Fluid.Controls 1.0 | ||
20 | import "../.." | ||
21 | |||
22 | Column { | ||
23 | id: mainLayout | ||
24 | |||
25 | property int paletteIndex | ||
26 | property string paletteName | ||
27 | property color paletteColor | ||
28 | |||
29 | spacing: 0 | ||
30 | |||
31 | Rectangle { | ||
32 | width: 300 | ||
33 | height: 80 | ||
34 | color: paletteColor | ||
35 | |||
36 | Label { | ||
37 | anchors { | ||
38 | top: parent.top | ||
39 | left: parent.left | ||
40 | margins: Units.smallSpacing * 2 | ||
41 | } | ||
42 | font.bold: true | ||
43 | color: Utils.lightDark(parent.color, blackColor, whiteColor) | ||
44 | text: paletteName | ||
45 | } | ||
46 | } | ||
47 | |||
48 | Column { | ||
49 | spacing: 0 | ||
50 | |||
51 | Repeater { | ||
52 | model: ListModel { | ||
53 | ListElement { | ||
54 | shadeIndex: Material.Shade100 | ||
55 | name: "100" | ||
56 | } | ||
57 | ListElement { | ||
58 | shadeIndex: Material.Shade200 | ||
59 | name: "200" | ||
60 | } | ||
61 | ListElement { | ||
62 | shadeIndex: Material.Shade300 | ||
63 | name: "300" | ||
64 | } | ||
65 | ListElement { | ||
66 | shadeIndex: Material.Shade400 | ||
67 | name: "400" | ||
68 | } | ||
69 | ListElement { | ||
70 | shadeIndex: Material.Shade500 | ||
71 | name: "500" | ||
72 | } | ||
73 | ListElement { | ||
74 | shadeIndex: Material.Shade600 | ||
75 | name: "600" | ||
76 | } | ||
77 | ListElement { | ||
78 | shadeIndex: Material.Shade700 | ||
79 | name: "700" | ||
80 | } | ||
81 | ListElement { | ||
82 | shadeIndex: Material.Shade800 | ||
83 | name: "800" | ||
84 | } | ||
85 | ListElement { | ||
86 | shadeIndex: Material.Shade900 | ||
87 | name: "900" | ||
88 | } | ||
89 | } | ||
90 | |||
91 | Rectangle { | ||
92 | width: 300 | ||
93 | height: 40 | ||
94 | color: Material.color(paletteIndex, model.shadeIndex) | ||
95 | |||
96 | Label { | ||
97 | anchors { | ||
98 | left: parent.left | ||
99 | verticalCenter: parent.verticalCenter | ||
100 | margins: Units.smallSpacing * 2 | ||
101 | } | ||
102 | font.bold: true | ||
103 | color: Utils.lightDark(parent.color, blackColor, whiteColor) | ||
104 | text: model.name | ||
105 | } | ||
106 | |||
107 | Label { | ||
108 | anchors { | ||
109 | right: parent.right | ||
110 | verticalCenter: parent.verticalCenter | ||
111 | margins: Units.smallSpacing * 2 | ||
112 | } | ||
113 | font.bold: true | ||
114 | color: Utils.lightDark(parent.color, blackColor, whiteColor) | ||
115 | text: parent.color | ||
116 | } | ||
117 | } | ||
118 | } | ||
119 | } | ||
120 | |||
121 | Column { | ||
122 | spacing: 0 | ||
123 | |||
124 | Repeater { | ||
125 | model: ListModel { | ||
126 | ListElement { | ||
127 | shadeIndex: Material.ShadeA100 | ||
128 | name: "A100" | ||
129 | } | ||
130 | ListElement { | ||
131 | shadeIndex: Material.ShadeA200 | ||
132 | name: "A200" | ||
133 | } | ||
134 | ListElement { | ||
135 | shadeIndex: Material.ShadeA400 | ||
136 | name: "A400" | ||
137 | } | ||
138 | ListElement { | ||
139 | shadeIndex: Material.ShadeA700 | ||
140 | name: "A700" | ||
141 | } | ||
142 | } | ||
143 | |||
144 | Rectangle { | ||
145 | width: 300 | ||
146 | height: 40 | ||
147 | color: Material.color(paletteIndex, model.shadeIndex) | ||
148 | |||
149 | Label { | ||
150 | anchors { | ||
151 | left: parent.left | ||
152 | verticalCenter: parent.verticalCenter | ||
153 | margins: Units.smallSpacing * 2 | ||
154 | } | ||
155 | font.bold: true | ||
156 | color: Utils.lightDark(parent.color, blackColor, whiteColor) | ||
157 | text: model.name | ||
158 | } | ||
159 | |||
160 | Label { | ||
161 | anchors { | ||
162 | right: parent.right | ||
163 | verticalCenter: parent.verticalCenter | ||
164 | margins: Units.smallSpacing * 2 | ||
165 | } | ||
166 | font.bold: true | ||
167 | color: Utils.lightDark(parent.color, blackColor, whiteColor) | ||
168 | text: parent.color | ||
169 | } | ||
170 | } | ||
171 | } | ||
172 | } | ||
173 | } | ||
diff --git a/prototype_2016/resources/qml/Pages/Style/TypographyPage.qml b/prototype_2016/resources/qml/Pages/Style/TypographyPage.qml new file mode 100644 index 0000000..d87d00c --- /dev/null +++ b/prototype_2016/resources/qml/Pages/Style/TypographyPage.qml | |||
@@ -0,0 +1,87 @@ | |||
1 | /* | ||
2 | * This file is part of Fluid. | ||
3 | * | ||
4 | * Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | ||
5 | * | ||
6 | * $BEGIN_LICENSE:MPL2$ | ||
7 | * | ||
8 | * This Source Code Form is subject to the terms of the Mozilla Public | ||
9 | * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
10 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
11 | * | ||
12 | * $END_LICENSE$ | ||
13 | */ | ||
14 | |||
15 | import QtQuick 2.0 | ||
16 | import QtQuick.Layouts 1.0 | ||
17 | import QtQuick.Controls 2.0 | ||
18 | import Fluid.Controls 1.0 | ||
19 | import "../.." | ||
20 | |||
21 | Flickable { | ||
22 | clip: true | ||
23 | contentHeight: Math.max(layout.implicitHeight, height) | ||
24 | |||
25 | ScrollBar.vertical: ScrollBar {} | ||
26 | |||
27 | ColumnLayout { | ||
28 | id: layout | ||
29 | anchors.fill: parent | ||
30 | anchors.margins: Units.mediumSpacing | ||
31 | spacing: Units.smallSpacing | ||
32 | |||
33 | DisplayLabel { | ||
34 | level: 4 | ||
35 | text: "Display 4" | ||
36 | } | ||
37 | |||
38 | DisplayLabel { | ||
39 | level: 3 | ||
40 | text: "Display 3" | ||
41 | } | ||
42 | |||
43 | DisplayLabel { | ||
44 | level: 2 | ||
45 | text: "Display 2" | ||
46 | } | ||
47 | |||
48 | DisplayLabel { | ||
49 | level: 1 | ||
50 | text: "Display 1" | ||
51 | } | ||
52 | |||
53 | HeadlineLabel { | ||
54 | text: "Headline" | ||
55 | } | ||
56 | |||
57 | TitleLabel { | ||
58 | text: "Title" | ||
59 | } | ||
60 | |||
61 | SubheadingLabel { | ||
62 | text: "Subheading" | ||
63 | } | ||
64 | |||
65 | BodyLabel { | ||
66 | level: 2 | ||
67 | text: "Body 2" | ||
68 | } | ||
69 | |||
70 | BodyLabel { | ||
71 | level: 1 | ||
72 | text: "Body 1" | ||
73 | } | ||
74 | |||
75 | CaptionLabel { | ||
76 | text: "Caption" | ||
77 | } | ||
78 | |||
79 | Label { | ||
80 | text: "Label" | ||
81 | } | ||
82 | |||
83 | Item { | ||
84 | Layout.fillHeight: true | ||
85 | } | ||
86 | } | ||
87 | } | ||