feat(ui/modules/Common/Form/ExclusiveButtons): supports left/right clicks

This commit is contained in:
Ronan Abhamon 2017-01-05 14:42:21 +01:00
parent c153ce191d
commit 2a3680ec72

View file

@ -22,7 +22,23 @@ Row {
spacing: ExclusiveButtonsStyle.buttonsSpacing
Keys.onLeftPressed: {
if (selectedButton > 0) {
clicked(--selectedButton)
}
}
Keys.onRightPressed: {
if (selectedButton < repeater.count - 1) {
clicked(++selectedButton)
}
}
// ---------------------------------------------------------------------------
Repeater {
id: repeater
model: texts
SmallButton {