summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2014-10-06 14:09:22 +0200
committerRichard Moe Gustavsen <richard.gustavsen@digia.com>2014-10-06 15:00:08 +0200
commit726babbcff54b589dbc46a2f53a4eb9f0ad03cb9 (patch)
tree3c380b8d755d34446f37524f0b137d6fe655d3ac
parent60911e61333f89b0e079444a2b790f5fd4d20a96 (diff)
downloadqtquickcontrols-726babbcff54b589dbc46a2f53a4eb9f0ad03cb9.tar.gz
add support for setting cursor delegate through style
Change-Id: I064c4df7213a8c1c0ecc38ea9b224444abf13d1d Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
-rw-r--r--src/controls/Private/TextInputWithHandles.qml1
-rw-r--r--src/controls/Styles/Base/ComboBoxStyle.qml5
-rw-r--r--src/controls/Styles/Base/SpinBoxStyle.qml5
-rw-r--r--src/controls/Styles/Base/TextAreaStyle.qml5
-rw-r--r--src/controls/Styles/Base/TextFieldStyle.qml5
-rw-r--r--src/controls/TextArea.qml1
6 files changed, 22 insertions, 0 deletions
diff --git a/src/controls/Private/TextInputWithHandles.qml b/src/controls/Private/TextInputWithHandles.qml
index e5d72f96..f3348774 100644
--- a/src/controls/Private/TextInputWithHandles.qml
+++ b/src/controls/Private/TextInputWithHandles.qml
@@ -52,6 +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
selectByMouse: control.selectByMouse && (!cursorHandle.delegate || !selectionHandle.delegate)
diff --git a/src/controls/Styles/Base/ComboBoxStyle.qml b/src/controls/Styles/Base/ComboBoxStyle.qml
index f71c8c98..77d2e91e 100644
--- a/src/controls/Styles/Base/ComboBoxStyle.qml
+++ b/src/controls/Styles/Base/ComboBoxStyle.qml
@@ -317,4 +317,9 @@ Style {
\endtable
*/
property Component selectionHandle
+
+ /*! The cursor delegate.
+ \since QtQuick.Controls.Styles 1.3
+ */
+ property Component cursorDelegate
}
diff --git a/src/controls/Styles/Base/SpinBoxStyle.qml b/src/controls/Styles/Base/SpinBoxStyle.qml
index 14d72863..1bcb6b5c 100644
--- a/src/controls/Styles/Base/SpinBoxStyle.qml
+++ b/src/controls/Styles/Base/SpinBoxStyle.qml
@@ -247,4 +247,9 @@ Style {
\endtable
*/
property Component selectionHandle
+
+ /*! The cursor delegate.
+ \since QtQuick.Controls.Styles 1.3
+ */
+ property Component cursorDelegate
}
diff --git a/src/controls/Styles/Base/TextAreaStyle.qml b/src/controls/Styles/Base/TextAreaStyle.qml
index cc154a5d..bd3ed31e 100644
--- a/src/controls/Styles/Base/TextAreaStyle.qml
+++ b/src/controls/Styles/Base/TextAreaStyle.qml
@@ -141,4 +141,9 @@ ScrollViewStyle {
\endtable
*/
property Component selectionHandle
+
+ /*! The cursor delegate.
+ \since QtQuick.Controls.Styles 1.3
+ */
+ property Component cursorDelegate
}
diff --git a/src/controls/Styles/Base/TextFieldStyle.qml b/src/controls/Styles/Base/TextFieldStyle.qml
index a7e5884a..c1e7a69f 100644
--- a/src/controls/Styles/Base/TextFieldStyle.qml
+++ b/src/controls/Styles/Base/TextFieldStyle.qml
@@ -194,4 +194,9 @@ Style {
\endtable
*/
property Component selectionHandle
+
+ /*! The cursor delegate.
+ \since QtQuick.Controls.Styles 1.3
+ */
+ property Component cursorDelegate
}
diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml
index d2663e17..5e8387db 100644
--- a/src/controls/TextArea.qml
+++ b/src/controls/TextArea.qml
@@ -718,6 +718,7 @@ ScrollView {
TextEdit {
id: edit
focus: true
+ cursorDelegate: __style && __style.cursorDelegate ? __style.cursorDelegate : null
Rectangle {
id: colorRect