aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-04-28 21:40:31 +0300
committerJ-P Nurmi <jpnurmi@qt.io>2017-04-29 09:19:49 +0000
commite1ae67cb2b9daa9bbbc9f87c8af03f3810022774 (patch)
tree2a9be14e276aa396b16cf57c64e49b45f560ce8f
parentd1ff2fbb1a444dd8d1d574ac649dbc257325a5b7 (diff)
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 <mitch.curtis@qt.io>
-rw-r--r--src/imports/controls/material/CursorDelegate.qml4
1 files 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