don't manually highlight tablet buttons from swipeview, since the tablet button highligh themselves

This commit is contained in:
Dante Ruiz 2018-01-24 16:36:08 -08:00
parent 6f54921cb1
commit 6149630ccd
2 changed files with 0 additions and 16 deletions

View file

@ -158,7 +158,6 @@ Item {
gridView.currentIndex = buttonIndex
tabletButton.isEntered = true;
Tablet.playSound(TabletEnums.ButtonHover);
if (tabletButton.isActive) {
tabletButton.state = "hover active state";
} else {

View file

@ -144,22 +144,7 @@ Item {
bottomMargin: 0
}
function setButtonState(buttonIndex, buttonstate) {
if (buttonIndex < 0 || gridView.contentItem === undefined
|| gridView.contentItem.children.length - 1 < buttonIndex) {
return;
}
var itemat = gridView.contentItem.children[buttonIndex].children[0];
if (itemat.isActive) {
itemat.state = "active state";
} else {
itemat.state = buttonstate;
}
}
onCurrentIndexChanged: {
setButtonState(previousGridIndex, "base state");
setButtonState(currentIndex, "hover state");
previousGridIndex = currentIndex
}