From 2cff237d2e4925ac653109583987d790f4cffd65 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 23 Oct 2017 15:01:23 +0200 Subject: Show an IBeamCursor while hovering over a textfield. --- framework/qml/TextEditor.qml | 6 +++++- framework/qml/TextField.qml | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'framework/qml') diff --git a/framework/qml/TextEditor.qml b/framework/qml/TextEditor.qml index 784cdecd..b6e62ef6 100644 --- a/framework/qml/TextEditor.qml +++ b/framework/qml/TextEditor.qml @@ -59,7 +59,6 @@ FocusScope { cursorPosition: edit.cursorPosition } - Rectangle { anchors.fill: parent border.width: 1 @@ -109,6 +108,11 @@ FocusScope { font.family: Kube.Font.fontFamily selectionColor: Kube.Colors.highlightColor padding: Kube.Units.smallSpacing + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text + cursorShape: Qt.IBeamCursor + } } } } diff --git a/framework/qml/TextField.qml b/framework/qml/TextField.qml index feb34a33..effdc43b 100644 --- a/framework/qml/TextField.qml +++ b/framework/qml/TextField.qml @@ -48,6 +48,11 @@ T.TextField { text: root.placeholderText color: Kube.Colors.disabledTextColor elide: Text.ElideRight + MouseArea { + anchors.fill: parent + acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text + cursorShape: Qt.IBeamCursor + } } background: Rectangle { -- cgit v1.2.3