X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmdictionary%2Fqml%2FCheckbox.qml;h=75046e3a84af897e5028c0a44564aa7f56afb6dc;hb=b4b3cec1e6eb007baf2b8ea83bd21df90643675d;hp=7e965125982ddd07c0c1c57902e840a4636dfd42;hpb=cd6d19c3e9a71f2e19d13beaf119554905803a12;p=mdictionary diff --git a/src/mdictionary/qml/Checkbox.qml b/src/mdictionary/qml/Checkbox.qml index 7e96512..75046e3 100644 --- a/src/mdictionary/qml/Checkbox.qml +++ b/src/mdictionary/qml/Checkbox.qml @@ -32,6 +32,12 @@ Image { property string pathToCheckedDicImage: "qrc:/button/checkboxCheckedDis.png" property string pathToUncheckedDicImage: "qrc:/button/checkboxDis.png" signal changed + + Keys.onPressed: { + if (event.key == Qt.Key_Space) + selected=!selected + } + height: { var aspectRatio = sourceSize.height / sourceSize.width return checkbox.width * aspectRatio @@ -74,4 +80,21 @@ Image { } } } + + Rectangle{ + id: focusRectangle + color: "#000000" + border.color: "#000000" + opacity: 0; + radius: 1 + anchors.centerIn: parent + z:1; + } + + onFocusChanged: { + if(focus) + focusRectangle.opacity=0.5; + else + focusRectangle.opacity=0; + } }