summaryrefslogtreecommitdiffstats
path: root/framework/qml
diff options
context:
space:
mode:
authorMichael Bohlender <michael.bohlender@kdemail.net>2017-07-27 12:48:53 +0200
committerMichael Bohlender <michael.bohlender@kdemail.net>2017-07-27 12:48:53 +0200
commit3c52f4941f4274a51587dd5ca71ade7b17964dcc (patch)
treef3036143e90d45c4e74c3b69c8a3e196aaa42caf /framework/qml
parent3a0de882ab0eaf4f16e69edf4d87e27d144de687 (diff)
downloadkube-3c52f4941f4274a51587dd5ca71ade7b17964dcc.tar.gz
kube-3c52f4941f4274a51587dd5ca71ade7b17964dcc.zip
intoduce Kube.Checkbox
Diffstat (limited to 'framework/qml')
-rw-r--r--framework/qml/CheckBox.qml49
-rw-r--r--framework/qml/Icons.qml1
2 files changed, 50 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"