From b7ce67c2774197026885e500e9ef495460eb0d33 Mon Sep 17 00:00:00 2001 From: Tuomas Vaarala Date: Fri, 10 Mar 2017 11:40:01 +0200 Subject: 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 --- src/controls/Styles/Base/MenuBarStyle.qml | 4 ++-- 1 file 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) } } -- cgit v1.2.1