Integrated file selection dialogue with the main code. Improved the
[openvpnui.git] / qml / filebrowse / components / LetterSwitch.qml
1 import QtQuick 2.0
2 import Sailfish.Silica 1.0
3
4 // This component is a toggle switch, which displays a letter or a dash '-'
5 MouseArea {
6     // checked status of the switch
7     property bool checked: false
8
9     // letter to be displayed
10     property string letter: ""
11
12     height: parent.height
13
14     Label {
15         id: label
16         anchors.horizontalCenter: parent.horizontalCenter
17         anchors.verticalCenter: parent.verticalCenter
18         text: checked ? letter : "-"
19         color: Theme.primaryColor
20     }
21
22     onClicked: checked = !checked
23 }