summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2016-04-18 14:19:55 +0200
committerRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2016-04-26 10:13:00 +0000
commit0df91d58000170ed26fbcb28437d8ce18b70944b (patch)
tree695d10e54b7ab4f619e147712af3e49de6de872a
parente7de8865926e3d51561bb44efc1f8423238058ea (diff)
downloadqtquickcontrols-0df91d58000170ed26fbcb28437d8ce18b70944b.tar.gz
iOS: Let CursorDelegate respond to cursorFlashTime from style hints
Change-Id: I4d8cf26272767a82c89cc1119afecfe1a0fedabd Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
-rw-r--r--src/controls/Styles/iOS/CursorDelegate.qml8
1 files 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: [