diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2014-10-29 17:29:16 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2014-10-30 10:43:16 +0100 |
commit | 3a851dfd4078b3ca9f9c1b06424b136cc6f852c5 (patch) | |
tree | 8df32ef561f75be2b50fb95a04bb44463b34b0f0 /src/controls/Private/TextInputWithHandles.qml | |
parent | 052dea3003b393d2ebb6754d0ed2fd7329cd8d26 (diff) | |
download | qtquickcontrols-3a851dfd4078b3ca9f9c1b06424b136cc6f852c5.tar.gz |
Make the cursor and selection handle delegates private for now
The API is not ideal, we don't want to lock this thing down like as it
is now. All styles implemented so far created CursorHandleStyle.qml and
SelectionHandleStyle.qml so perhaps that's the better way to go.
Furthermore, there's never going to be multiple occurrences of the
handle pairs, so it should be one shared instance. Thus, the relevant
style delegates probably shouldn't be sprinkled around various control
styles...
So, for now, the most pragmatic solution is to make the handles and
cursors internal since we don't have time to revamp it before 5.4.0.
Change-Id: Ib9fcc4a431bb510c8c55a760159f4d6a631554b3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/controls/Private/TextInputWithHandles.qml')
-rw-r--r-- | src/controls/Private/TextInputWithHandles.qml | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/controls/Private/TextInputWithHandles.qml b/src/controls/Private/TextInputWithHandles.qml index 3c8351a3..ceb63084 100644 --- a/src/controls/Private/TextInputWithHandles.qml +++ b/src/controls/Private/TextInputWithHandles.qml @@ -52,7 +52,7 @@ TextInput { readonly property int selectionPosition: selectionStart !== cursorPosition ? selectionStart : selectionEnd readonly property alias containsMouse: mouseArea.containsMouse property alias editMenu: editMenu - cursorDelegate: __style && __style.cursorDelegate ? __style.cursorDelegate : null + cursorDelegate: __style && __style.__cursorDelegate ? __style.__cursorDelegate : null selectByMouse: control.selectByMouse && (!cursorHandle.delegate || !selectionHandle.delegate) @@ -164,7 +164,6 @@ TextInput { parent: control control: input.control active: control.selectByMouse - delegate: style.cursorHandle minimum: input.hasSelection ? selectionHandle.position + 1 : -1 property var mappedPos: parent.mapFromItem(editor, editor.cursorRectangle.x, editor.cursorRectangle.y) |