feat(StatusListItem): add highlighted property

This commit is contained in:
Patryk Osmaczko 2022-02-07 21:56:57 +01:00 committed by r4bbit.eth
parent b7d6554b80
commit 5780f183c7
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ Rectangle {
property real leftPadding: 16
property real rightPadding: 16
property bool enabled: true
property bool highlighted: false
property int type: StatusListItem.Type.Primary
property list<Item> components
@ -100,7 +101,7 @@ Rectangle {
implicitWidth: 448
implicitHeight: Math.max(64, statusListItemTitleArea.height + 16)
color: {
if (sensor.containsMouse) {
if (sensor.containsMouse || statusListItem.highlighted) {
switch(type) {
case StatusListItem.Type.Primary:
return Theme.palette.baseColor2