diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2014-07-17 22:24:18 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@digia.com> | 2014-07-17 22:27:43 +0200 |
commit | b5f2f8403fe5044dfca7dad379494a3554af3090 (patch) | |
tree | 540bd55239d17c2d471c7cc048f19202279cefe9 /src | |
parent | 267acc4587c91beafc0f8f3ea97c70801dc269f0 (diff) | |
download | qtquickcontrols-b5f2f8403fe5044dfca7dad379494a3554af3090.tar.gz |
SpinBox: revert back to querying font via style panel
This is a partial revert of 8c3afd8 for the same reason than 790769d.
Change-Id: Ia082f375caa441a5db562b04369699092cf0007e
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/controls/SpinBox.qml | 2 | ||||
-rw-r--r-- | src/controls/Styles/Base/SpinBoxStyle.qml | 2 | ||||
-rw-r--r-- | src/controls/Styles/Desktop/SpinBoxStyle.qml | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index 03a296f1..83b18a6a 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -281,7 +281,7 @@ Control { onEditingFinished: spinbox.editingFinished() - font: __style ? __style.font : TextSingleton.font + font: __panel ? __panel.font : TextSingleton.font color: __panel ? __panel.foregroundColor : "black" selectionColor: __panel ? __panel.selectionColor : "black" selectedTextColor: __panel ? __panel.selectedTextColor : "black" diff --git a/src/controls/Styles/Base/SpinBoxStyle.qml b/src/controls/Styles/Base/SpinBoxStyle.qml index 67f3b588..6115fc06 100644 --- a/src/controls/Styles/Base/SpinBoxStyle.qml +++ b/src/controls/Styles/Base/SpinBoxStyle.qml @@ -169,6 +169,8 @@ Style { implicitHeight: backgroundLoader.implicitHeight baselineOffset: backgroundLoader.item ? backgroundLoader.item.baselineOffset : 0 + property font font: spinboxStyle.font + property color foregroundColor: spinboxStyle.textColor property color selectionColor: spinboxStyle.selectionColor property color selectedTextColor: spinboxStyle.selectedTextColor diff --git a/src/controls/Styles/Desktop/SpinBoxStyle.qml b/src/controls/Styles/Desktop/SpinBoxStyle.qml index 63fd32ce..d7d32916 100644 --- a/src/controls/Styles/Desktop/SpinBoxStyle.qml +++ b/src/controls/Styles/Desktop/SpinBoxStyle.qml @@ -53,7 +53,6 @@ Style { StyleItem {id: styleitem ; visible: false} property int renderType: Text.NativeRendering - property alias font: styleitem.font property Component panel: Item { id: style @@ -64,6 +63,8 @@ Style { property int horizontalAlignment: Qt.platform.os === "osx" ? Qt.AlignRight : Qt.AlignLeft property int verticalAlignment: Qt.AlignVCenter + property alias font: styleitem.font + property color foregroundColor: SystemPaletteSingleton.text(control.enabled) property color backgroundColor: SystemPaletteSingleton.base(control.enabled) property color selectionColor: SystemPaletteSingleton.highlight(control.enabled) |