From a1ed3c4dd7e95f153660961c202480db83ae78f0 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 20 Aug 2021 13:19:58 +0200 Subject: [PATCH] Native styles: always draw button text using palette.buttonText color On neither macOS nor windows will the color of the text on a button change if it's checked or highlighted. We should always use just palette.buttonText. Pick-to: 6.2 Task-number: QTBUG-95593 Change-Id: Ifdedae5b775c6e65371340bc4f3a573c7a89376e Reviewed-by: Mitch Curtis --- src/quicknativestyle/controls/DefaultButton.qml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/quicknativestyle/controls/DefaultButton.qml b/src/quicknativestyle/controls/DefaultButton.qml index 696becb226..631f37da01 100644 --- a/src/quicknativestyle/controls/DefaultButton.qml +++ b/src/quicknativestyle/controls/DefaultButton.qml @@ -65,8 +65,7 @@ T.Button { icon.width: 24 icon.height: 24 - icon.color: control.checked || control.highlighted ? control.palette.brightText : - control.flat && !control.down ? (control.visualFocus ? control.palette.highlight : control.palette.windowText) : control.palette.buttonText + icon.color: control.palette.buttonText contentItem: IconLabel { spacing: control.spacing @@ -76,7 +75,6 @@ T.Button { icon: control.icon text: control.text font: control.font - color: control.checked || control.highlighted ? control.palette.brightText : - control.flat && !control.down ? (control.visualFocus ? control.palette.highlight : control.palette.windowText) : control.palette.buttonText + color: control.palette.buttonText } }