aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/universal/SpinBox.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-04-16 18:37:09 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-04-18 14:11:31 +0000
commitb9c3f6b95e116354acc3f70c0811f4d2f4c68afe (patch)
tree3331ce65de4436f0f4ff98a7ae514efc18bc17eb /src/imports/controls/universal/SpinBox.qml
parent392d520ade77e6fb941e54fdaa8b23d34c745a8b (diff)
Universal: add foreground and background attached properties
Same as b51e520f for Material. This has been a common request on the mailing lists and forums. Users want to customize the text color of various controls without having to replace whole delegates. This change makes it possible to specify both foreground (eg. Button text) and background (eg. ApplicationWindow, Page and Pane background) colors so that they propagate to children in the same way than accent and theme do. Change-Id: I55084c58f0c62e8088b270ed98437241e382ca15 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/universal/SpinBox.qml')
-rw-r--r--src/imports/controls/universal/SpinBox.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/imports/controls/universal/SpinBox.qml b/src/imports/controls/universal/SpinBox.qml
index 8088289c..4751b83c 100644
--- a/src/imports/controls/universal/SpinBox.qml
+++ b/src/imports/controls/universal/SpinBox.qml
@@ -73,7 +73,7 @@ T.SpinBox {
font: control.font
color: !enabled ? control.Universal.chromeDisabledLowColor :
- activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.baseHighColor
+ activeFocus ? control.Universal.chromeBlackHighColor : control.Universal.foreground
selectionColor: control.Universal.accent
selectedTextColor: control.Universal.chromeWhiteColor
horizontalAlignment: Qt.AlignHCenter
@@ -145,7 +145,7 @@ T.SpinBox {
border.width: 2 // TextControlBorderThemeThickness
border.color: !control.enabled ? control.Universal.baseLowColor :
control.activeFocus ? control.Universal.accent : control.Universal.chromeDisabledLowColor
- color: control.enabled ? control.Universal.altHighColor : control.Universal.baseLowColor
+ color: control.enabled ? control.Universal.background : control.Universal.baseLowColor
}
//! [background]
}