summaryrefslogtreecommitdiff
path: root/src/controls
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2014-07-08 14:55:09 +0200
committerJ-P Nurmi <jpnurmi@digia.com>2014-07-08 17:50:40 +0200
commit8c3afd82b298dc2189f3e5f9edafac1b2bf6a722 (patch)
tree5c040a80301b380a6543bfe02772bfcc0afffdf0 /src/controls
parent818710e83c08cd97401f9858ccd29f0333488462 (diff)
downloadqtquickcontrols-8c3afd82b298dc2189f3e5f9edafac1b2bf6a722.tar.gz
Add SpinBoxStyle::font
Replace the hidden panel.font-property with a proper font-property that is used in other textual controls' styles too. Change-Id: I93d712ba48e249d28dde0bc27406a13fb6aff1b0 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Diffstat (limited to 'src/controls')
-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)