From 1af5c166c534034ecfb4253d97166518f434d4cb Mon Sep 17 00:00:00 2001 From: Noelia Date: Tue, 20 Feb 2024 19:44:27 +0100 Subject: [PATCH] SQ(StatusDraggableListItem): Added new property `changeColorOnDragActive ` This property holds if background color will be changed on drag active or not. --- .../src/StatusQ/Components/StatusDraggableListItem.qml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/StatusQ/src/StatusQ/Components/StatusDraggableListItem.qml b/ui/StatusQ/src/StatusQ/Components/StatusDraggableListItem.qml index 9fcee0fa8b..8ef6752289 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusDraggableListItem.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusDraggableListItem.qml @@ -218,6 +218,13 @@ ItemDelegate { */ readonly property alias containsMouse: dragHandler.containsMouse + /*! + \qmlproperty bool StatusDraggableListItem::changeColorOnDragActive + This property holds if background color will be changed on drag active or not + Defaults to "dragActive" (ie background will change on dragActive = true) + */ + property bool changeColorOnDragActive: dragActive + Drag.dragType: Drag.Automatic Drag.hotSpot.x: dragHandler.mouseX Drag.hotSpot.y: dragHandler.mouseY @@ -252,7 +259,7 @@ ItemDelegate { ] background: Rectangle { - color: root.dragActive && !root.customizable ? Theme.palette.alphaColor(Theme.palette.baseColor2, 0.7) : root.bgColor + color: root.changeColorOnDragActive && !root.customizable? Theme.palette.alphaColor(Theme.palette.baseColor2, 0.7) : root.bgColor border.width: root.customizable ? 0 : 1 border.color: Theme.palette.baseColor2 radius: root.customizable ? 0 : 8