summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/controls/SpinBox.qml2
-rw-r--r--src/controls/Styles/Base/SpinBoxStyle.qml8
-rw-r--r--src/controls/Styles/Desktop/SpinBoxStyle.qml3
3 files changed, 8 insertions, 5 deletions
diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml
index f4374bbb..5d1268d8 100644
--- a/src/controls/SpinBox.qml
+++ b/src/controls/SpinBox.qml
@@ -278,7 +278,7 @@ Control {
onEditingFinished: spinbox.editingFinished()
- font: __panel ? __panel.font : TextSingleton.font
+ font: __style ? __style.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 6c76386f..67f3b588 100644
--- a/src/controls/Styles/Base/SpinBoxStyle.qml
+++ b/src/controls/Styles/Base/SpinBoxStyle.qml
@@ -110,6 +110,12 @@ Style {
*/
property int renderType: Text.NativeRendering
+ /*!
+ \since QtQuick.Controls.Styles 1.3
+ The font of the control.
+ */
+ property font font
+
/*! The button used to increment the value. */
property Component incrementControl: Item {
implicitWidth: padding.right
@@ -163,8 +169,6 @@ Style {
implicitHeight: backgroundLoader.implicitHeight
baselineOffset: backgroundLoader.item ? backgroundLoader.item.baselineOffset : 0
- property font 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 d7d32916..63fd32ce 100644
--- a/src/controls/Styles/Desktop/SpinBoxStyle.qml
+++ b/src/controls/Styles/Desktop/SpinBoxStyle.qml
@@ -53,6 +53,7 @@ Style {
StyleItem {id: styleitem ; visible: false}
property int renderType: Text.NativeRendering
+ property alias font: styleitem.font
property Component panel: Item {
id: style
@@ -63,8 +64,6 @@ 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)