summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2022-11-25 12:46:12 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-11-25 20:15:43 +0000
commitfbdd3c35cf1a90559f83ef6d964eb24e8902d78b (patch)
treec7b964cd49ac759f2f749829133b548e5b5fe9bb
parentb9a63b57ec872813d077435aa623ccc81dc06f44 (diff)
downloadqtdoc-fbdd3c35cf1a90559f83ef6d964eb24e8902d78b.tar.gz
addressbook example: use system palette to define background color
On macOS with native style in use, a (push)button is drawn using NSButtonCell. In Dark theme it's transparent (and the text on button has white color). Having a white background (table view's cell), transparent button on top + white text makes the text invisible. Fixes: QTBUG-108513 Change-Id: I29e92fc2c9adc1f34bc7401f8ba560128f6c5214 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 11d2f8bb22a99a172d1a409e7ab5a11146d90a2a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/demos/addressbook/qml/main.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/demos/addressbook/qml/main.qml b/examples/demos/addressbook/qml/main.qml
index 2505cd40..76cfec37 100644
--- a/examples/demos/addressbook/qml/main.qml
+++ b/examples/demos/addressbook/qml/main.qml
@@ -141,6 +141,8 @@ ApplicationWindow {
DelegateChoice {
column: 0
delegate: Rectangle {
+ SystemPalette { id: activePalette }
+ color: activePalette.alternateBase
Button {
id: deleteButton
text: qsTr("Delete")