Implement selection

Contributes to issue CURA-8686.
This commit is contained in:
Ghostkeeper 2022-01-25 18:03:45 +01:00
parent 5671b6c61f
commit 59494cdace
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -108,7 +108,7 @@ Item
{ {
height: UM.Theme.getSize("section").height height: UM.Theme.getSize("section").height
color: UM.Theme.getColor((row % 2 == 0) ? "main_background": "viewport_background") color: UM.Theme.getColor((tableScrollView.currentRow == row) ? "primary" : ((row % 2 == 0) ? "main_background" : "viewport_background"))
Label Label
{ {
@ -121,7 +121,14 @@ Item
font: UM.Theme.getFont("default") font: UM.Theme.getFont("default")
color: UM.Theme.getColor("text") color: UM.Theme.getColor("text")
} }
} MouseArea
{
anchors.fill: parent
onClicked:
{
tableScrollView.currentRow = row; //Select this row.
}
}
}
} }
} }