From 3af897fb54bae73f3a8d3e470361d42168383d74 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Sat, 15 Oct 2022 12:21:00 +0200 Subject: 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 --- examples/quick/externaldraganddrop/DragAndDropTextItem.qml | 5 +++-- examples/quick/externaldraganddrop/externaldraganddrop.qml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'examples') 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 -- cgit v1.2.1