feat(StatusListItem): add highlighted property
This commit is contained in:
parent
b7d6554b80
commit
5780f183c7
|
@ -21,6 +21,7 @@ Rectangle {
|
||||||
property real leftPadding: 16
|
property real leftPadding: 16
|
||||||
property real rightPadding: 16
|
property real rightPadding: 16
|
||||||
property bool enabled: true
|
property bool enabled: true
|
||||||
|
property bool highlighted: false
|
||||||
property int type: StatusListItem.Type.Primary
|
property int type: StatusListItem.Type.Primary
|
||||||
property list<Item> components
|
property list<Item> components
|
||||||
|
|
||||||
|
@ -100,7 +101,7 @@ Rectangle {
|
||||||
implicitWidth: 448
|
implicitWidth: 448
|
||||||
implicitHeight: Math.max(64, statusListItemTitleArea.height + 16)
|
implicitHeight: Math.max(64, statusListItemTitleArea.height + 16)
|
||||||
color: {
|
color: {
|
||||||
if (sensor.containsMouse) {
|
if (sensor.containsMouse || statusListItem.highlighted) {
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case StatusListItem.Type.Primary:
|
case StatusListItem.Type.Primary:
|
||||||
return Theme.palette.baseColor2
|
return Theme.palette.baseColor2
|
||||||
|
|
Loading…
Reference in New Issue