summaryrefslogtreecommitdiff
path: root/src/controls/TextArea.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2014-10-17 13:35:09 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2014-10-17 16:10:08 +0200
commit737379ad810d4431a93bed214f50b25632ba00e5 (patch)
tree8535f9b2f8fff7737fa96a363a8e7b72343be2ff /src/controls/TextArea.qml
parent95ea596beecf25119dc769de1b854414cc27e242 (diff)
downloadqtquickcontrols-737379ad810d4431a93bed214f50b25632ba00e5.tar.gz
Fix TextField & TextArea mouse cursor shape
Mouse cursor shape is specified by an internal MouseArea inside editor. Edit menu was placing another MouseArea on top, so the cursor shape was lost. This change makes EditMenu re-use the same MouseArea. Task-number: QTBUG-41955 Change-Id: I71e38bb42ea20f63b3e15c4c2cc7282b64b10d62 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/controls/TextArea.qml')
-rw-r--r--src/controls/TextArea.qml4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml
index e1c6a249..844cbff1 100644
--- a/src/controls/TextArea.qml
+++ b/src/controls/TextArea.qml
@@ -846,9 +846,10 @@ ScrollView {
}
MouseArea {
+ id: mouseArea
anchors.fill: parent
cursorShape: edit.hoveredLink ? Qt.PointingHandCursor : Qt.IBeamCursor
- acceptedButtons: edit.selectByMouse ? Qt.NoButton : Qt.LeftButton
+ acceptedButtons: (edit.selectByMouse ? Qt.NoButton : Qt.LeftButton) | (area.menu ? Qt.RightButton : Qt.NoButton)
onClicked: {
var pos = edit.positionAt(mouse.x, mouse.y)
edit.moveHandles(pos, pos)
@@ -865,6 +866,7 @@ ScrollView {
id: editMenu
control: area
input: edit
+ mouseArea: mouseArea
cursorHandle: cursorHandle
selectionHandle: selectionHandle
flickable: flickable