summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/controls/SpinBox.qml2
-rw-r--r--src/controls/Styles/Base/SpinBoxStyle.qml15
-rw-r--r--src/controls/Styles/Base/TextFieldStyle.qml15
-rw-r--r--src/controls/Styles/Desktop/SpinBoxStyle.qml2
-rw-r--r--src/controls/Styles/Desktop/TextFieldStyle.qml2
-rw-r--r--src/controls/TextField.qml4
6 files changed, 37 insertions, 3 deletions
diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml
index 5f96434a..0cc2f5a7 100644
--- a/src/controls/SpinBox.qml
+++ b/src/controls/SpinBox.qml
@@ -260,7 +260,7 @@ Control {
selectedTextColor: __panel ? __panel.selectedTextColor : "black"
opacity: parent.enabled ? 1 : 0.5
- renderType: Text.NativeRendering
+ renderType: __style ? __style.renderType : Text.NativeRendering
function selectValue() {
select(prefix.length, text.length - suffix.length)
diff --git a/src/controls/Styles/Base/SpinBoxStyle.qml b/src/controls/Styles/Base/SpinBoxStyle.qml
index 795cdf45..1617ba1f 100644
--- a/src/controls/Styles/Base/SpinBoxStyle.qml
+++ b/src/controls/Styles/Base/SpinBoxStyle.qml
@@ -102,6 +102,21 @@ Style {
/*! The highlighted text color, used in selections. */
property color selectedTextColor: __syspal.highlightedText
+ /*!
+ \qmlproperty enumeration renderType
+
+ Override the default rendering type for the control.
+
+ Supported render types are:
+ \list
+ \li Text.QtRendering
+ \li Text.NativeRendering - the default
+ \endlist
+
+ \sa Text::renderType
+ */
+ property int renderType: Text.NativeRendering
+
/*! The button used to increment the value. */
property Component incrementControl: Item {
implicitWidth: 18
diff --git a/src/controls/Styles/Base/TextFieldStyle.qml b/src/controls/Styles/Base/TextFieldStyle.qml
index 0eb93e77..6c16c8de 100644
--- a/src/controls/Styles/Base/TextFieldStyle.qml
+++ b/src/controls/Styles/Base/TextFieldStyle.qml
@@ -91,6 +91,21 @@ Style {
/*! The highlighted text color, used in selections. */
property color selectedTextColor: __syspal.highlightedText
+ /*!
+ \qmlproperty enumeration renderType
+
+ Override the default rendering type for the control.
+
+ Supported render types are:
+ \list
+ \li Text.QtRendering
+ \li Text.NativeRendering - the default
+ \endlist
+
+ \sa Text::renderType
+ */
+ property int renderType: Text.NativeRendering
+
/*! The placeholder text color, used when the text field is empty.
\since 5.2
*/
diff --git a/src/controls/Styles/Desktop/SpinBoxStyle.qml b/src/controls/Styles/Desktop/SpinBoxStyle.qml
index fe374fe9..0fe5ac41 100644
--- a/src/controls/Styles/Desktop/SpinBoxStyle.qml
+++ b/src/controls/Styles/Desktop/SpinBoxStyle.qml
@@ -57,6 +57,8 @@ Style {
}
StyleItem {id: styleitem ; visible: false}
+ property int renderType: Text.NativeRendering
+
property Component panel: Item {
id: style
diff --git a/src/controls/Styles/Desktop/TextFieldStyle.qml b/src/controls/Styles/Desktop/TextFieldStyle.qml
index 10bcab68..7044b389 100644
--- a/src/controls/Styles/Desktop/TextFieldStyle.qml
+++ b/src/controls/Styles/Desktop/TextFieldStyle.qml
@@ -42,6 +42,8 @@ import QtQuick.Controls 1.1
import QtQuick.Controls.Private 1.0
Style {
+ property int renderType: Text.NativeRendering
+
property Component panel: StyleItem {
id: textfieldstyle
elementType: "edit"
diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml
index d8829403..8ac2e273 100644
--- a/src/controls/TextField.qml
+++ b/src/controls/TextField.qml
@@ -561,7 +561,7 @@ Control {
color: __panel ? __panel.placeholderTextColor : "darkgray"
clip: contentWidth > width;
elide: Text.ElideRight
- renderType: Text.NativeRendering
+ renderType: __style ? __style.renderType : Text.NativeRendering
Behavior on opacity { NumberAnimation { duration: 90 } }
}
@@ -584,7 +584,7 @@ Control {
color: __panel ? __panel.textColor : "darkgray"
clip: contentWidth > width
- renderType: Text.NativeRendering
+ renderType: __style ? __style.renderType : Text.NativeRendering
onAccepted: textfield.accepted()
}