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 <mitch.curtis@qt.io>
This commit is contained in:
Richard Moe Gustavsen 2021-08-20 13:19:58 +02:00
parent 9dc7a22b21
commit a1ed3c4dd7
1 changed files with 2 additions and 4 deletions

View File

@ -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
}
}