From e8f5964fc33bb3322e3bfe7b66e67b220b2f1a71 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Wed, 19 Jul 2017 15:36:47 +0200 Subject: [PATCH] fix(ComboBox): change background color if ComboBox instance is disabled --- ui/modules/Common/Form/ComboBox.qml | 5 ++++- ui/modules/Common/Styles/Form/ComboBoxStyle.qml | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ui/modules/Common/Form/ComboBox.qml b/ui/modules/Common/Form/ComboBox.qml index e208714c6..f1c45bc9b 100644 --- a/ui/modules/Common/Form/ComboBox.qml +++ b/ui/modules/Common/Form/ComboBox.qml @@ -26,7 +26,10 @@ ComboBox { width: ComboBoxStyle.background.border.width } - color: ComboBoxStyle.background.color + color: comboBox.enabled + ? ComboBoxStyle.background.color.normal + : ComboBoxStyle.background.color.readOnly + radius: ComboBoxStyle.background.radius implicitHeight: ComboBoxStyle.background.height diff --git a/ui/modules/Common/Styles/Form/ComboBoxStyle.qml b/ui/modules/Common/Styles/Form/ComboBoxStyle.qml index f1df642a9..e2567976b 100644 --- a/ui/modules/Common/Styles/Form/ComboBoxStyle.qml +++ b/ui/modules/Common/Styles/Form/ComboBoxStyle.qml @@ -8,7 +8,6 @@ import Units 1.0 QtObject { property QtObject background: QtObject { - property color color: Colors.k property int height: 36 property int iconSize: 10 property int radius: 4 @@ -18,6 +17,11 @@ QtObject { property color color: Colors.c property int width: 1 } + + property QtObject color: QtObject { + property color normal: Colors.k + property color readOnly: Colors.e + } } property QtObject contentItem: QtObject {