summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--framework/qml/CheckBox.qml49
-rw-r--r--framework/qml/Icons.qml1
-rw-r--r--framework/qmldir1
3 files changed, 51 insertions, 0 deletions
diff --git a/framework/qml/CheckBox.qml b/framework/qml/CheckBox.qml
new file mode 100644
index 00000000..acd16783
--- /dev/null
+++ b/framework/qml/CheckBox.qml
@@ -0,0 +1,49 @@
1/*
2 * Copyright (C) 2017 Michael Bohlender, <bohlender@kolabsys.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19import QtQuick 2.7
20import QtQuick.Templates 2.0 as T
21import org.kube.framework 1.0 as Kube
22
23T.CheckBox {
24 id: root
25
26 implicitWidth: indicator.width
27 implicitHeight: indicator.width
28
29 indicator: Rectangle {
30 width: Kube.Units.gridUnit
31 height: Kube.Units.gridUnit
32
33 color: Kube.Colors.viewBackgroundColor
34
35 border.width: 1
36 border.color: Kube.Colors.buttonColor
37
38 Kube.Icon {
39 anchors.centerIn: parent
40
41 visible: root.checked
42
43 height: Kube.Units.gridUnit
44 width: Kube.Units.gridUnit
45
46 iconName: Kube.Icons.checkbox
47 }
48 }
49}
diff --git a/framework/qml/Icons.qml b/framework/qml/Icons.qml
index 6f0a8652..3126c797 100644
--- a/framework/qml/Icons.qml
+++ b/framework/qml/Icons.qml
@@ -53,6 +53,7 @@ Item {
53 property string goDown: "go-down" 53 property string goDown: "go-down"
54 property string goDown_inverted: "go-down-inverted" 54 property string goDown_inverted: "go-down-inverted"
55 property string goUp: "go-up" 55 property string goUp: "go-up"
56 property string checkbox: "checkbox"
56 57
57 property string addNew: "list-add" 58 property string addNew: "list-add"
58 property string remove: "kube-list-remove-inverted" 59 property string remove: "kube-list-remove-inverted"
diff --git a/framework/qmldir b/framework/qmldir
index 93f0fc59..c8e0ae58 100644
--- a/framework/qmldir
+++ b/framework/qmldir
@@ -19,6 +19,7 @@ Popup 1.0 Popup.qml
19ProgressBar 1.0 ProgressBar.qml 19ProgressBar 1.0 ProgressBar.qml
20StatusBar 1.0 StatusBar.qml 20StatusBar 1.0 StatusBar.qml
21ComboBox 1.0 ComboBox.qml 21ComboBox 1.0 ComboBox.qml
22CheckBox 1.0 CheckBox.qml
22PositiveButton 1.0 PositiveButton.qml 23PositiveButton 1.0 PositiveButton.qml
23TextButton 1.0 TextButton.qml 24TextButton 1.0 TextButton.qml
24TextField 1.0 TextField.qml 25TextField 1.0 TextField.qml