using alternating colors

This commit is contained in:
Chris Cochrun 2024-06-21 14:43:43 -05:00
parent 79da2fbe65
commit 269db49fa4

View file

@ -249,7 +249,7 @@ ColumnLayout {
icon: itemIcon
iconSize: Kirigami.Units.gridUnit
supportsMouseEvents: false
backgroundColor: Kirigami.Theme.backgroundColor;
backgroundColor: index % 2 === 0 ? Kirigami.Theme.backgroundColor : Kirigami.Theme.alternateBackgroundColor;
Binding on backgroundColor {
when: dragHandler.containsMouse ||
(selectionModel.hasSelection &&