From e1ae67cb2b9daa9bbbc9f87c8af03f3810022774 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 28 Apr 2017 21:40:31 +0300 Subject: Material: fix editor cursor visibility The cursor should not be visible for read-only editors. Task-number: QTBUG-58797 Change-Id: I9e0fb0fd1c0afac31ab202e7e4ea0f8bde19372c Reviewed-by: Mitch Curtis --- src/imports/controls/material/CursorDelegate.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/imports/controls/material/CursorDelegate.qml b/src/imports/controls/material/CursorDelegate.qml index 0880bc0a..2af44017 100644 --- a/src/imports/controls/material/CursorDelegate.qml +++ b/src/imports/controls/material/CursorDelegate.qml @@ -42,7 +42,7 @@ Rectangle { color: parent.Material.accentColor width: 2 - visible: parent.activeFocus && parent.selectionStart === parent.selectionEnd + visible: parent.activeFocus && !parent.readOnly && parent.selectionStart === parent.selectionEnd Connections { target: cursor.parent @@ -55,7 +55,7 @@ Rectangle { Timer { id: timer - running: cursor.parent.activeFocus + running: cursor.parent.activeFocus && !cursor.parent.readOnly repeat: true interval: Qt.styleHints.cursorFlashTime / 2 onTriggered: cursor.opacity = !cursor.opacity ? 1 : 0 -- cgit v1.2.3