diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2014-07-08 14:44:21 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@digia.com> | 2014-07-09 12:42:18 +0200 |
commit | a25023d56f16d8d3c08cc60f7059cf10a3b8a5ba (patch) | |
tree | 34226a760ac54021b81f2d98eb0c5809a8fcaf23 | |
parent | e7ddea5d1038efc20fd4a27d1147a1c8133e567c (diff) | |
download | qtquickcontrols-a25023d56f16d8d3c08cc60f7059cf10a3b8a5ba.tar.gz |
Add ComboBoxStyle::font
Replace the hidden editorFont-property (recently added for the Android
style) with a proper font-property that is used in other styles too.
The same font is used for the label and the editor.
Change-Id: I3fd1aa1d501ada335046c0d0401119e2e0a22c11
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
-rw-r--r-- | src/controls/ComboBox.qml | 2 | ||||
-rw-r--r-- | src/controls/Styles/Base/ComboBoxStyle.qml | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml index 995cdcde..44ae2433 100644 --- a/src/controls/ComboBox.qml +++ b/src/controls/ComboBox.qml @@ -369,7 +369,7 @@ Control { verticalAlignment: Text.AlignVCenter - font: __style && __style.editorFont !== undefined ? __style.editorFont : TextSingleton.font + font: __style && __style.font !== undefined ? __style.font : TextSingleton.font renderType: __style ? __style.renderType : Text.NativeRendering selectByMouse: true color: SystemPaletteSingleton.text(enabled) diff --git a/src/controls/Styles/Base/ComboBoxStyle.qml b/src/controls/Styles/Base/ComboBoxStyle.qml index de78dc02..02ecf8c0 100644 --- a/src/controls/Styles/Base/ComboBoxStyle.qml +++ b/src/controls/Styles/Base/ComboBoxStyle.qml @@ -70,6 +70,12 @@ Style { */ property int renderType: Text.NativeRendering + /*! + \since QtQuick.Controls.Styles 1.3 + The font of the control. + */ + property font font + /*! The \l ComboBox attached to this style. */ readonly property ComboBox control: __control @@ -168,6 +174,7 @@ Style { anchors.verticalCenter: parent.verticalCenter text: control.currentText renderType: cbStyle.renderType + font: cbStyle.font color: SystemPaletteSingleton.text(control.enabled) elide: Text.ElideRight } @@ -211,6 +218,7 @@ Style { /*! \internal */ property Component __dropDownStyle: MenuStyle { + font: cbStyle.font __maxPopupHeight: 600 __menuItemType: "comboboxitem" __scrollerStyle: ScrollViewStyle { } |