summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2013-11-26 19:27:28 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-27 15:29:12 +0100
commitfad829ff7ab42b91c611f458ea48b75094f2e082 (patch)
treeb8392629a151ecc56506d51073b5916d02e67b94
parent80a5e0fffcf5c064ac4fea1ed8dc7e0a390a2d45 (diff)
downloadqtquickcontrols-fad829ff7ab42b91c611f458ea48b75094f2e082.tar.gz
Add ComboBoxStyle::renderType
Change-Id: I59c145d0826926b096faae7b01390e9201b5e28f Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
-rw-r--r--src/controls/ComboBox.qml2
-rw-r--r--src/controls/Styles/Base/ComboBoxStyle.qml19
-rw-r--r--src/controls/Styles/Desktop/ComboBoxStyle.qml1
3 files changed, 20 insertions, 2 deletions
diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml
index db39f579..8298a2d9 100644
--- a/src/controls/ComboBox.qml
+++ b/src/controls/ComboBox.qml
@@ -321,7 +321,7 @@ Control {
verticalAlignment: Text.AlignVCenter
- renderType: Text.NativeRendering
+ renderType: __style ? __style.renderType : Text.NativeRendering
selectByMouse: true
selectionColor: syspal.highlight
selectedTextColor: syspal.highlightedText
diff --git a/src/controls/Styles/Base/ComboBoxStyle.qml b/src/controls/Styles/Base/ComboBoxStyle.qml
index 2b4b237d..bbd2e331 100644
--- a/src/controls/Styles/Base/ComboBoxStyle.qml
+++ b/src/controls/Styles/Base/ComboBoxStyle.qml
@@ -52,6 +52,23 @@ import QtQuick.Controls.Private 1.0
*/
Style {
+ id: style
+
+ /*!
+ \qmlproperty enumeration renderType
+ \since 5.3
+
+ 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
/*! \internal */
property var __syspal: SystemPalette {
@@ -151,7 +168,7 @@ Style {
anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
text: control.currentText
- renderType: Text.NativeRendering
+ renderType: style.renderType
color: __syspal.text
elide: Text.ElideRight
}
diff --git a/src/controls/Styles/Desktop/ComboBoxStyle.qml b/src/controls/Styles/Desktop/ComboBoxStyle.qml
index b36b4c1d..c679efec 100644
--- a/src/controls/Styles/Desktop/ComboBoxStyle.qml
+++ b/src/controls/Styles/Desktop/ComboBoxStyle.qml
@@ -46,6 +46,7 @@ import "." as Desktop
Style {
readonly property ComboBox control: __control
+ property int renderType: Text.NativeRendering
property int drowDownButtonWidth: 24
property Component panel: Item {
property bool popup: !!styleItem.styleHint("comboboxpopup")