Commit c4402bf4 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(ui/modules/Linphone/TelKeypad/TelKeypad): clear correctly button color

parent caba6374
...@@ -66,6 +66,8 @@ Rectangle { ...@@ -66,6 +66,8 @@ Rectangle {
}] }]
TelKeypadButton { TelKeypadButton {
property var _timeout
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
...@@ -84,7 +86,6 @@ Rectangle { ...@@ -84,7 +86,6 @@ Rectangle {
readonly property int delta: 5 readonly property int delta: 5
property var _timeout
property int _id property int _id
property var _mouseX property var _mouseX
property var _mouseY property var _mouseY
...@@ -107,15 +108,17 @@ Rectangle { ...@@ -107,15 +108,17 @@ Rectangle {
onReleased: { onReleased: {
if (Math.abs(_mouseX - mouse.x) <= delta && Math.abs(_mouseY - mouse.y) <= delta) { if (Math.abs(_mouseX - mouse.x) <= delta && Math.abs(_mouseY - mouse.y) <= delta) {
grid.children[_id].color = TelKeypadStyle.button.color.pressed var children = grid.children[_id]
grid.children[_id].clicked() children.color = TelKeypadStyle.button.color.pressed
children.clicked()
if (_timeout) { var timeout = children._timeout
Utils.clearTimeout(_timeout) if (timeout) {
Utils.clearTimeout(timeout)
} }
_timeout = Utils.setTimeout(this, 100, (function (id) { children._timeout = Utils.setTimeout(this, 100, (function (id) {
grid.children[id].color = TelKeypadStyle.button.color.normal grid.children[id].color = TelKeypadStyle.button.color.normal
}).bind(this, _id)) }).bind(this, _id))
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment