From 0df91d58000170ed26fbcb28437d8ce18b70944b Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 18 Apr 2016 14:19:55 +0200 Subject: iOS: Let CursorDelegate respond to cursorFlashTime from style hints Change-Id: I4d8cf26272767a82c89cc1119afecfe1a0fedabd Reviewed-by: J-P Nurmi --- src/controls/Styles/iOS/CursorDelegate.qml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/controls/Styles/iOS/CursorDelegate.qml b/src/controls/Styles/iOS/CursorDelegate.qml index cf35e35d..5312398c 100644 --- a/src/controls/Styles/iOS/CursorDelegate.qml +++ b/src/controls/Styles/iOS/CursorDelegate.qml @@ -61,10 +61,14 @@ Rectangle { Timer { id: timer - running: cursor.visible + running: cursor.visible && Qt.styleHints.cursorFlashTime >= 2 repeat: true - interval: 500 + interval: Qt.styleHints.cursorFlashTime / 2 onTriggered: cursor.state = cursor.state == "on" ? "off" : "on" + onRunningChanged: { + if (!running) + cursor.state = "on" + } } states: [ -- cgit v1.2.1