diff options
author | Thomas Zander <tom@flowee.org> | 2022-10-15 12:21:00 +0200 |
---|---|---|
committer | Thomas Zander <tom@flowee.org> | 2023-03-03 19:44:37 +0100 |
commit | 3af897fb54bae73f3a8d3e470361d42168383d74 (patch) | |
tree | a10487b1ca286cfacf6b91dffb6418c933d7aaf2 /examples | |
parent | 746824b49a2c1cc0e9d5ff89cc5b31c52911aea1 (diff) | |
download | qtdeclarative-3af897fb54bae73f3a8d3e470361d42168383d74.tar.gz |
Example: no longer use hardcoded colors and make text readable
In a dark-theme setup, the hardcoded backgrounds of white ended up
with a white text on white background.
This changes things to simply use the basic palette also used by
the Label and CheckBox components.
Change-Id: I2a983dc1b57b05559dcb3c032e587ef0f65c4a1c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/quick/externaldraganddrop/DragAndDropTextItem.qml | 5 | ||||
-rw-r--r-- | examples/quick/externaldraganddrop/externaldraganddrop.qml | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/quick/externaldraganddrop/DragAndDropTextItem.qml b/examples/quick/externaldraganddrop/DragAndDropTextItem.qml index c241f6ed82..8a53745974 100644 --- a/examples/quick/externaldraganddrop/DragAndDropTextItem.qml +++ b/examples/quick/externaldraganddrop/DragAndDropTextItem.qml @@ -8,11 +8,12 @@ Rectangle { id: item property string display property alias dropEnabled: acceptDropCB.checked - color: dropArea.containsDrag ? "#CFC" : "#EEE" + color: dropArea.containsDrag ? Qt.darker(palette.base) : palette.base + ColorAnimation on color { id: rejectAnimation from: "#FCC" - to: "#EEE" + to: palette.base duration: 1000 } Label { diff --git a/examples/quick/externaldraganddrop/externaldraganddrop.qml b/examples/quick/externaldraganddrop/externaldraganddrop.qml index b0cd20e69e..22b3f52089 100644 --- a/examples/quick/externaldraganddrop/externaldraganddrop.qml +++ b/examples/quick/externaldraganddrop/externaldraganddrop.qml @@ -5,7 +5,7 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts -Item { +Pane { id: root width: 320 height: 480 |