diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-07-27 12:48:53 +0200 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-07-27 12:48:53 +0200 |
commit | 3c52f4941f4274a51587dd5ca71ade7b17964dcc (patch) | |
tree | f3036143e90d45c4e74c3b69c8a3e196aaa42caf /framework/qml/CheckBox.qml | |
parent | 3a0de882ab0eaf4f16e69edf4d87e27d144de687 (diff) | |
download | kube-3c52f4941f4274a51587dd5ca71ade7b17964dcc.tar.gz kube-3c52f4941f4274a51587dd5ca71ade7b17964dcc.zip |
intoduce Kube.Checkbox
Diffstat (limited to 'framework/qml/CheckBox.qml')
-rw-r--r-- | framework/qml/CheckBox.qml | 49 |
1 files changed, 49 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 | |||
19 | import QtQuick 2.7 | ||
20 | import QtQuick.Templates 2.0 as T | ||
21 | import org.kube.framework 1.0 as Kube | ||
22 | |||
23 | T.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 | } | ||