summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2022-11-25 12:46:12 +0100
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2022-11-25 20:54:01 +0100
commit11d2f8bb22a99a172d1a409e7ab5a11146d90a2a (patch)
treec435262ce0f5cd1733775ab4b9a16e9953639ed3
parent0832cd4c4e3dd28412aab05f31c8956f484b1419 (diff)
downloadqtdoc-11d2f8bb22a99a172d1a409e7ab5a11146d90a2a.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. Pick-to: 6.4 Fixes: QTBUG-108513 Change-Id: I29e92fc2c9adc1f34bc7401f8ba560128f6c5214 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
-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")