From 34b35318bc3935385a9cce221cd3e24e2ddcd57b Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Tue, 22 Jun 2021 10:59:54 +0200 Subject: [PATCH] fix(StatusListItem): ensure icon background in secondary type works correctly --- sandbox/ListItems.qml | 6 ++++++ src/StatusQ/Components/StatusListItem.qml | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sandbox/ListItems.qml b/sandbox/ListItems.qml index fb35851e..72e07fe2 100644 --- a/sandbox/ListItems.qml +++ b/sandbox/ListItems.qml @@ -224,6 +224,12 @@ GridLayout { ] } + StatusListItem { + title: "Title" + icon.name: "info" + type: StatusListItem.Type.Secondary + } + StatusDescriptionListItem { title: "Title" subTitle: "Subtitle" diff --git a/src/StatusQ/Components/StatusListItem.qml b/src/StatusQ/Components/StatusListItem.qml index 5fa4888c..7e5e8da4 100644 --- a/src/StatusQ/Components/StatusListItem.qml +++ b/src/StatusQ/Components/StatusListItem.qml @@ -37,9 +37,9 @@ Rectangle { background: StatusIconBackgroundSettings { width: 40 height: 40 - color: type === StatusListItem.Type.Primary ? - Theme.palette.primaryColor3 : - "transparent" + color: sensor.containsMouse && type === StatusListItem.Type.Secondary ? + "transparent" : + Theme.palette.primaryColor3 } } property StatusImageSettings image: StatusImageSettings {