summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuomas Vaarala <tuomas.vaarala@qt.io>2017-03-10 11:40:01 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-03-11 06:52:22 +0000
commitb7ce67c2774197026885e500e9ef495460eb0d33 (patch)
tree382482d1211f183cfc8b01aad58a083e5bc5daaf
parentfb5e28850a1cdf86cecea1151ee68da35f759184 (diff)
downloadqtquickcontrols-b7ce67c2774197026885e500e9ef495460eb0d33.tar.gz
Take enabled property into account when styling MenuBar item
When the MenuBar item's property enabled is set as false: - Gray out the MenuBar item text. - Disable the blue highlighting of item when selected. Task-number: QTBUG-59335 Change-Id: I2fb0eb5539bdeaf487f0fc5d499ace72e6c916b7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
-rw-r--r--src/controls/Styles/Base/MenuBarStyle.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controls/Styles/Base/MenuBarStyle.qml b/src/controls/Styles/Base/MenuBarStyle.qml
index e5823a14..7add8f09 100644
--- a/src/controls/Styles/Base/MenuBarStyle.qml
+++ b/src/controls/Styles/Base/MenuBarStyle.qml
@@ -100,7 +100,7 @@ Style {
property Component itemDelegate: Rectangle {
implicitWidth: text.width + 12
implicitHeight: text.height + 4
- color: styleData.open ? "#49d" : "transparent"
+ color: styleData.enabled && styleData.open ? "#49d" : "transparent"
Text {
id: text
@@ -108,7 +108,7 @@ Style {
text: formatMnemonic(styleData.text, styleData.underlineMnemonic)
anchors.centerIn: parent
renderType: Settings.isMobile ? Text.QtRendering : Text.NativeRendering
- color: styleData.open ? "white" : SystemPaletteSingleton.windowText(control.enabled)
+ color: styleData.open ? "white" : SystemPaletteSingleton.windowText(control.enabled && styleData.enabled)
}
}