making servicelist follow the selected and active attribute of items

This commit is contained in:
Chris Cochrun 2022-10-01 07:02:35 -05:00
parent d343470d7c
commit dd58cb3b6b

View file

@ -152,7 +152,9 @@ ColumnLayout {
hoverEnabled: false hoverEnabled: false
supportsMouseEvents: false supportsMouseEvents: false
backgroundColor: { backgroundColor: {
if (serviceItemList.currentIndex === index) if (active)
Kirigami.Theme.highlightColor;
else if (selected)
Kirigami.Theme.highlightColor; Kirigami.Theme.highlightColor;
else if (mouseHandler.containsMouse) else if (mouseHandler.containsMouse)
Kirigami.Theme.hoverColor; Kirigami.Theme.hoverColor;
@ -160,7 +162,7 @@ ColumnLayout {
Kirigami.Theme.backgroundColor; Kirigami.Theme.backgroundColor;
} }
textColor: { textColor: {
if (serviceItemList.currentIndex === index || if (selected ||
mouseHandler.containsMouse) mouseHandler.containsMouse)
activeTextColor; activeTextColor;
else else