summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/controls/ComboBox.qml4
-rw-r--r--src/controls/Private/TextInputWithHandles.qml3
-rw-r--r--src/controls/SpinBox.qml4
-rw-r--r--src/controls/Styles/Android/ComboBoxStyle.qml4
-rw-r--r--src/controls/Styles/Android/SpinBoxStyle.qml4
-rw-r--r--src/controls/Styles/Android/TextAreaStyle.qml4
-rw-r--r--src/controls/Styles/Android/TextFieldStyle.qml4
-rw-r--r--src/controls/Styles/Base/ComboBoxStyle.qml15
-rw-r--r--src/controls/Styles/Base/SpinBoxStyle.qml15
-rw-r--r--src/controls/Styles/Base/TextAreaStyle.qml15
-rw-r--r--src/controls/Styles/Base/TextFieldStyle.qml15
-rw-r--r--src/controls/Styles/iOS/ComboBoxStyle.qml6
-rw-r--r--src/controls/Styles/iOS/SpinBoxStyle.qml6
-rw-r--r--src/controls/Styles/iOS/TextAreaStyle.qml6
-rw-r--r--src/controls/Styles/iOS/TextFieldStyle.qml6
-rw-r--r--src/controls/TextArea.qml6
-rw-r--r--src/controls/TextField.qml4
-rw-r--r--tests/manual/texthandles/main.qml16
18 files changed, 74 insertions, 63 deletions
diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml
index 68429483c..f2f37a0a5 100644
--- a/src/controls/ComboBox.qml
+++ b/src/controls/ComboBox.qml
@@ -401,8 +401,8 @@ Control {
clip: contentWidth > width
control: comboBox
- cursorHandle: __style ? __style.cursorHandle : undefined
- selectionHandle: __style ? __style.selectionHandle : undefined
+ cursorHandle: __style ? __style.__cursorHandle : undefined
+ selectionHandle: __style ? __style.__selectionHandle : undefined
anchors.fill: parent
anchors.leftMargin: __style ? __style.padding.left : 0
diff --git a/src/controls/Private/TextInputWithHandles.qml b/src/controls/Private/TextInputWithHandles.qml
index 3c8351a3d..ceb63084f 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)
diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml
index f13e81dc4..66a210274 100644
--- a/src/controls/SpinBox.qml
+++ b/src/controls/SpinBox.qml
@@ -291,8 +291,8 @@ Control {
anchors.bottomMargin: __style ? __style.padding.bottom: 0
control: spinbox
- cursorHandle: __style ? __style.cursorHandle : undefined
- selectionHandle: __style ? __style.selectionHandle : undefined
+ cursorHandle: __style ? __style.__cursorHandle : undefined
+ selectionHandle: __style ? __style.__selectionHandle : undefined
focus: true
activeFocusOnPress: spinbox.activeFocusOnPress
diff --git a/src/controls/Styles/Android/ComboBoxStyle.qml b/src/controls/Styles/Android/ComboBoxStyle.qml
index 715dd9f69..b6ff1c307 100644
--- a/src/controls/Styles/Android/ComboBoxStyle.qml
+++ b/src/controls/Styles/Android/ComboBoxStyle.qml
@@ -105,11 +105,11 @@ Style {
property Component __popupStyle: null
property Component __dropDownStyle: null
- property Component selectionHandle: DrawableLoader {
+ property Component __selectionHandle: DrawableLoader {
styleDef: AndroidStyle.styleDef.textViewStyle.TextView_textSelectHandleLeft
x: -width / 4 * 3
y: styleData.lineHeight
}
- property Component cursorHandle: CursorHandleStyle { }
+ property Component __cursorHandle: CursorHandleStyle { }
}
diff --git a/src/controls/Styles/Android/SpinBoxStyle.qml b/src/controls/Styles/Android/SpinBoxStyle.qml
index 86fce0349..5c05774fa 100644
--- a/src/controls/Styles/Android/SpinBoxStyle.qml
+++ b/src/controls/Styles/Android/SpinBoxStyle.qml
@@ -98,11 +98,11 @@ Style {
}
}
- property Component selectionHandle: DrawableLoader {
+ property Component __selectionHandle: DrawableLoader {
styleDef: AndroidStyle.styleDef.textViewStyle.TextView_textSelectHandleLeft
x: -width / 4 * 3
y: styleData.lineHeight
}
- property Component cursorHandle: CursorHandleStyle { }
+ property Component __cursorHandle: CursorHandleStyle { }
}
diff --git a/src/controls/Styles/Android/TextAreaStyle.qml b/src/controls/Styles/Android/TextAreaStyle.qml
index 61ea9fb85..85950efa0 100644
--- a/src/controls/Styles/Android/TextAreaStyle.qml
+++ b/src/controls/Styles/Android/TextAreaStyle.qml
@@ -72,11 +72,11 @@ ScrollViewStyle {
styleDef: style.styleDef
}
- property Component selectionHandle: DrawableLoader {
+ property Component __selectionHandle: DrawableLoader {
styleDef: AndroidStyle.styleDef.textViewStyle.TextView_textSelectHandleLeft
x: -width / 4 * 3
y: styleData.lineHeight
}
- property Component cursorHandle: CursorHandleStyle { }
+ property Component __cursorHandle: CursorHandleStyle { }
}
diff --git a/src/controls/Styles/Android/TextFieldStyle.qml b/src/controls/Styles/Android/TextFieldStyle.qml
index e7eec32c6..67cd3b786 100644
--- a/src/controls/Styles/Android/TextFieldStyle.qml
+++ b/src/controls/Styles/Android/TextFieldStyle.qml
@@ -91,11 +91,11 @@ Style {
}
}
- property Component selectionHandle: DrawableLoader {
+ property Component __selectionHandle: DrawableLoader {
styleDef: AndroidStyle.styleDef.textViewStyle.TextView_textSelectHandleLeft
x: -width / 4 * 3
y: styleData.lineHeight
}
- property Component cursorHandle: CursorHandleStyle { }
+ property Component __cursorHandle: CursorHandleStyle { }
}
diff --git a/src/controls/Styles/Base/ComboBoxStyle.qml b/src/controls/Styles/Base/ComboBoxStyle.qml
index 77d2e91e1..1a810772a 100644
--- a/src/controls/Styles/Base/ComboBoxStyle.qml
+++ b/src/controls/Styles/Base/ComboBoxStyle.qml
@@ -280,7 +280,8 @@ Style {
property Component __scrollerStyle: null
}
- /*! The cursor handle.
+ /*! \internal
+ The cursor handle.
\since QtQuick.Controls.Styles 1.3
The parent of the handle is positioned to the top left corner of
@@ -297,9 +298,10 @@ Style {
\row \li \b {styleData.hasSelection} : bool \li Whether the editor has selected text.
\endtable
*/
- property Component cursorHandle
+ property Component __cursorHandle
- /*! The selection handle.
+ /*! \internal
+ The selection handle.
\since QtQuick.Controls.Styles 1.3
The parent of the handle is positioned to the top left corner of
@@ -316,10 +318,11 @@ Style {
\row \li \b {styleData.hasSelection} : bool \li Whether the editor has selected text.
\endtable
*/
- property Component selectionHandle
+ property Component __selectionHandle
- /*! The cursor delegate.
+ /*! \internal
+ The cursor delegate.
\since QtQuick.Controls.Styles 1.3
*/
- property Component cursorDelegate
+ property Component __cursorDelegate
}
diff --git a/src/controls/Styles/Base/SpinBoxStyle.qml b/src/controls/Styles/Base/SpinBoxStyle.qml
index 1bcb6b5cf..d821940a5 100644
--- a/src/controls/Styles/Base/SpinBoxStyle.qml
+++ b/src/controls/Styles/Base/SpinBoxStyle.qml
@@ -210,7 +210,8 @@ Style {
}
}
- /*! The cursor handle.
+ /*! \internal
+ The cursor handle.
\since QtQuick.Controls.Styles 1.3
The parent of the handle is positioned to the top left corner of
@@ -227,9 +228,10 @@ Style {
\row \li \b {styleData.hasSelection} : bool \li Whether the editor has selected text.
\endtable
*/
- property Component cursorHandle
+ property Component __cursorHandle
- /*! The selection handle.
+ /*! \internal
+ The selection handle.
\since QtQuick.Controls.Styles 1.3
The parent of the handle is positioned to the top left corner of
@@ -246,10 +248,11 @@ Style {
\row \li \b {styleData.hasSelection} : bool \li Whether the editor has selected text.
\endtable
*/
- property Component selectionHandle
+ property Component __selectionHandle
- /*! The cursor delegate.
+ /*! \internal
+ The cursor delegate.
\since QtQuick.Controls.Styles 1.3
*/
- property Component cursorDelegate
+ property Component __cursorDelegate
}
diff --git a/src/controls/Styles/Base/TextAreaStyle.qml b/src/controls/Styles/Base/TextAreaStyle.qml
index bd3ed31ea..56a1ec58f 100644
--- a/src/controls/Styles/Base/TextAreaStyle.qml
+++ b/src/controls/Styles/Base/TextAreaStyle.qml
@@ -104,7 +104,8 @@ ScrollViewStyle {
\sa TextArea::textMargin */
property real textMargin: 4
- /*! The cursor handle.
+ /*! \internal
+ The cursor handle.
\since QtQuick.Controls.Styles 1.3
The parent of the handle is positioned to the top left corner of
@@ -121,9 +122,10 @@ ScrollViewStyle {
\row \li \b {styleData.hasSelection} : bool \li Whether the editor has selected text.
\endtable
*/
- property Component cursorHandle
+ property Component __cursorHandle
- /*! The selection handle.
+ /*! \internal
+ The selection handle.
\since QtQuick.Controls.Styles 1.3
The parent of the handle is positioned to the top left corner of
@@ -140,10 +142,11 @@ ScrollViewStyle {
\row \li \b {styleData.hasSelection} : bool \li Whether the editor has selected text.
\endtable
*/
- property Component selectionHandle
+ property Component __selectionHandle
- /*! The cursor delegate.
+ /*! \internal
+ The cursor delegate.
\since QtQuick.Controls.Styles 1.3
*/
- property Component cursorDelegate
+ property Component __cursorDelegate
}
diff --git a/src/controls/Styles/Base/TextFieldStyle.qml b/src/controls/Styles/Base/TextFieldStyle.qml
index c1e7a69f6..4d0a66eba 100644
--- a/src/controls/Styles/Base/TextFieldStyle.qml
+++ b/src/controls/Styles/Base/TextFieldStyle.qml
@@ -157,7 +157,8 @@ Style {
}
}
- /*! The cursor handle.
+ /*! \internal
+ The cursor handle.
\since QtQuick.Controls.Styles 1.3
The parent of the handle is positioned to the top left corner of
@@ -174,9 +175,10 @@ Style {
\row \li \b {styleData.hasSelection} : bool \li Whether the editor has selected text.
\endtable
*/
- property Component cursorHandle
+ property Component __cursorHandle
- /*! The selection handle.
+ /*! \internal
+ The selection handle.
\since QtQuick.Controls.Styles 1.3
The parent of the handle is positioned to the top left corner of
@@ -193,10 +195,11 @@ Style {
\row \li \b {styleData.hasSelection} : bool \li Whether the editor has selected text.
\endtable
*/
- property Component selectionHandle
+ property Component __selectionHandle
- /*! The cursor delegate.
+ /*! \internal
+ The cursor delegate.
\since QtQuick.Controls.Styles 1.3
*/
- property Component cursorDelegate
+ property Component __cursorDelegate
}
diff --git a/src/controls/Styles/iOS/ComboBoxStyle.qml b/src/controls/Styles/iOS/ComboBoxStyle.qml
index 147fd7fdb..ba657298e 100644
--- a/src/controls/Styles/iOS/ComboBoxStyle.qml
+++ b/src/controls/Styles/iOS/ComboBoxStyle.qml
@@ -42,7 +42,7 @@ import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.3
ComboBoxStyle {
- selectionHandle: SelectionHandleStyle{}
- cursorHandle: CursorHandleStyle{}
- cursorDelegate: CursorDelegate{}
+ __selectionHandle: SelectionHandleStyle{}
+ __cursorHandle: CursorHandleStyle{}
+ __cursorDelegate: CursorDelegate{}
}
diff --git a/src/controls/Styles/iOS/SpinBoxStyle.qml b/src/controls/Styles/iOS/SpinBoxStyle.qml
index a764cb79d..c898e5e9f 100644
--- a/src/controls/Styles/iOS/SpinBoxStyle.qml
+++ b/src/controls/Styles/iOS/SpinBoxStyle.qml
@@ -42,7 +42,7 @@ import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.3
SpinBoxStyle {
- selectionHandle: SelectionHandleStyle{}
- cursorHandle: CursorHandleStyle{}
- cursorDelegate: CursorDelegate{}
+ __selectionHandle: SelectionHandleStyle{}
+ __cursorHandle: CursorHandleStyle{}
+ __cursorDelegate: CursorDelegate{}
}
diff --git a/src/controls/Styles/iOS/TextAreaStyle.qml b/src/controls/Styles/iOS/TextAreaStyle.qml
index 6b8a18003..6be12be68 100644
--- a/src/controls/Styles/iOS/TextAreaStyle.qml
+++ b/src/controls/Styles/iOS/TextAreaStyle.qml
@@ -51,7 +51,7 @@ ScrollViewStyle {
property color selectedTextColor: SystemPaletteSingleton.highlightedText(control.enabled)
property color backgroundColor: control.backgroundVisible ? SystemPaletteSingleton.base(control.enabled) : "transparent"
property int renderType: Text.QtRendering
- property Component selectionHandle: SelectionHandleStyle{}
- property Component cursorHandle: CursorHandleStyle{}
- property Component cursorDelegate: CursorDelegate{}
+ property Component __selectionHandle: SelectionHandleStyle{}
+ property Component __cursorHandle: CursorHandleStyle{}
+ property Component __cursorDelegate: CursorDelegate{}
}
diff --git a/src/controls/Styles/iOS/TextFieldStyle.qml b/src/controls/Styles/iOS/TextFieldStyle.qml
index 28ad692ff..ca237a0a2 100644
--- a/src/controls/Styles/iOS/TextFieldStyle.qml
+++ b/src/controls/Styles/iOS/TextFieldStyle.qml
@@ -42,7 +42,7 @@ import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.3
TextFieldStyle {
- selectionHandle: SelectionHandleStyle{}
- cursorHandle: CursorHandleStyle{}
- cursorDelegate: CursorDelegate{}
+ __selectionHandle: SelectionHandleStyle{}
+ __cursorHandle: CursorHandleStyle{}
+ __cursorDelegate: CursorDelegate{}
}
diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml
index 8acdb6dc5..c644230de 100644
--- a/src/controls/TextArea.qml
+++ b/src/controls/TextArea.qml
@@ -718,7 +718,7 @@ ScrollView {
TextEdit {
id: edit
focus: true
- cursorDelegate: __style && __style.cursorDelegate ? __style.cursorDelegate : null
+ cursorDelegate: __style && __style.__cursorDelegate ? __style.__cursorDelegate : null
Rectangle {
id: colorRect
@@ -885,7 +885,7 @@ ScrollView {
z: 1 // above scrollbars
parent: Qt.platform.os === "ios" ? editor : __scroller // no clip
active: area.selectByMouse
- delegate: __style.selectionHandle
+ delegate: __style.__selectionHandle
maximum: cursorHandle.position - 1
// Mention contentX and contentY in the mappedPos binding to force re-evaluation if they change
@@ -921,7 +921,7 @@ ScrollView {
z: 1 // above scrollbars
parent: Qt.platform.os === "ios" ? editor : __scroller // no clip
active: area.selectByMouse
- delegate: __style.cursorHandle
+ delegate: __style.__cursorHandle
minimum: edit.hasSelection ? selectionHandle.position + 1 : -1
// Mention contentX and contentY in the mappedPos binding to force re-evaluation if they change
diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml
index a7aa67eb7..5c1e5e516 100644
--- a/src/controls/TextField.qml
+++ b/src/controls/TextField.qml
@@ -633,8 +633,8 @@ Control {
selectedTextColor: __panel ? __panel.selectedTextColor : "white"
control: textfield
- cursorHandle: __style ? __style.cursorHandle : undefined
- selectionHandle: __style ? __style.selectionHandle : undefined
+ cursorHandle: __style ? __style.__cursorHandle : undefined
+ selectionHandle: __style ? __style.__selectionHandle : undefined
font: __panel ? __panel.font : TextSingleton.font
anchors.leftMargin: __panel ? __panel.leftMargin : 0
diff --git a/tests/manual/texthandles/main.qml b/tests/manual/texthandles/main.qml
index ab10b861b..5a520d170 100644
--- a/tests/manual/texthandles/main.qml
+++ b/tests/manual/texthandles/main.qml
@@ -105,8 +105,8 @@ ApplicationWindow {
selectByMouse: selectBox.checked
style: TextFieldStyle {
- cursorHandle: handleBox.checked ? cursorDelegate : null
- selectionHandle: handleBox.checked ? selectionDelegate : null
+ __cursorHandle: handleBox.checked ? cursorDelegate : null
+ __selectionHandle: handleBox.checked ? selectionDelegate : null
}
}
@@ -121,8 +121,8 @@ ApplicationWindow {
horizontalAlignment: Qt.AlignHCenter
style: SpinBoxStyle {
- cursorHandle: handleBox.checked ? cursorDelegate : null
- selectionHandle: handleBox.checked ? selectionDelegate : null
+ __cursorHandle: handleBox.checked ? cursorDelegate : null
+ __selectionHandle: handleBox.checked ? selectionDelegate : null
}
}
@@ -148,8 +148,8 @@ ApplicationWindow {
}
style: ComboBoxStyle {
- cursorHandle: handleBox.checked ? cursorDelegate : null
- selectionHandle: handleBox.checked ? selectionDelegate : null
+ __cursorHandle: handleBox.checked ? cursorDelegate : null
+ __selectionHandle: handleBox.checked ? selectionDelegate : null
}
}
@@ -164,8 +164,8 @@ ApplicationWindow {
text: loremIpsum + "<p>" + loremIpsum + "<p>" + loremIpsum + "<p>" + loremIpsum
style: TextAreaStyle {
- cursorHandle: handleBox.checked ? cursorDelegate : null
- selectionHandle: handleBox.checked ? selectionDelegate : null
+ __cursorHandle: handleBox.checked ? cursorDelegate : null
+ __selectionHandle: handleBox.checked ? selectionDelegate : null
}
}
}