diff options
author | Doris Verria <[email protected]> | 2024-07-01 15:31:53 +0200 |
---|---|---|
committer | Doris Verria <[email protected]> | 2024-07-03 12:09:22 +0200 |
commit | 8516ddf690440cd33e3332e8cb2d049ed0032954 (patch) | |
tree | 209178d4a4bf6827c724d6bdf4c13a62e9b17a13 /src/quickcontrols/fluentwinui3/ComboBox.qml | |
parent | 15a49ef0c1746f331635ebf51bb235e2b5c7df25 (diff) |
FluentWinUI3 Style: Use platform palette on Windows11+ platforms
When on Windows11+ platforms, use system colors as reported by the
platform theme.
Also don't use BrightText color role for pressed button text in the
FluentWinUI3 style, but hardcode this color. We do the same in the
windows11 widgets style. This is because the windows theme uses the
BrightText role for a different purpose.
Task-number: QTBUG-125279
Change-Id: I76c710145e0f9fdfbfe058300ba4477020bd62e9
Pick-to: 6.8
Reviewed-by: Santhosh Kumar <[email protected]>
Diffstat (limited to 'src/quickcontrols/fluentwinui3/ComboBox.qml')
-rw-r--r-- | src/quickcontrols/fluentwinui3/ComboBox.qml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/quickcontrols/fluentwinui3/ComboBox.qml b/src/quickcontrols/fluentwinui3/ComboBox.qml index fafe4c68f5..28641fe2f5 100644 --- a/src/quickcontrols/fluentwinui3/ComboBox.qml +++ b/src/quickcontrols/fluentwinui3/ComboBox.qml @@ -80,7 +80,11 @@ T.ComboBox { validator: control.validator selectByMouse: control.selectTextByMouse - color: control.down ? control.palette.brightText : control.palette.text + readonly property color __pressedText: Application.styleHints.colorScheme == Qt.Light + ? Qt.rgba(control.palette.text.r, control.palette.text.g, control.palette.text.b, 0.62) + : Qt.rgba(control.palette.text.r, control.palette.text.g, control.palette.text.b, 0.7725) + + color: control.down ? __pressedText : control.palette.text selectionColor: control.palette.highlight selectedTextColor: control.palette.highlightedText horizontalAlignment: control.config.label_text.textHAlignment |