diff options
| author | marcin <z.krzysztoff7@gmail.com> | 2014-07-11 16:19:13 +0200 |
|---|---|---|
| committer | marcin <z.krzysztoff7@gmail.com> | 2014-07-11 16:19:13 +0200 |
| commit | 5085aa3a64bae93de50f98a53f28d95c27496a1a (patch) | |
| tree | d547a0676376148b4041b45251000505d12b48dc /components/CheckBox.qml | |
| parent | f4279a9800befdeab6a787d9e029347ff8fcad3d (diff) | |
| download | monzero-gui-5085aa3a64bae93de50f98a53f28d95c27496a1a.tar.gz monzero-gui-5085aa3a64bae93de50f98a53f28d95c27496a1a.tar.xz monzero-gui-5085aa3a64bae93de50f98a53f28d95c27496a1a.zip | |
transfer v2 + checkbox
Diffstat (limited to 'components/CheckBox.qml')
| -rw-r--r-- | components/CheckBox.qml | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/components/CheckBox.qml b/components/CheckBox.qml new file mode 100644 index 00000000..f075e83c --- /dev/null +++ b/components/CheckBox.qml @@ -0,0 +1,54 @@ +import QtQuick 2.0 + +Item { + id: checkBox + property alias text: label.text + property bool checked: false + signal clicked() + height: 25 + width: label.x + label.width + clip: true + + Rectangle { + anchors.left: parent.left + height: parent.height - 1 + width: 25 + radius: 4 + y: 0 + color: "#DBDBDB" + } + + Rectangle { + anchors.left: parent.left + height: parent.height - 1 + width: 25 + radius: 4 + y: 1 + color: "#FFFFFF" + + Image { + anchors.centerIn: parent + source: checkBox.checked ? "../images/checkedIcon.png" : + "../images/uncheckedIcon.png" + } + } + + Text { + id: label + anchors.verticalCenter: parent.verticalCenter + anchors.left: parent.left + anchors.leftMargin: 25 + 12 + font.family: "Arial" + font.pixelSize: 14 + font.letterSpacing: -1 + color: "#525252" + } + + MouseArea { + anchors.fill: parent + onClicked: { + checkBox.checked = !checkBox.checked + checkBox.clicked() + } + } +} |
