highlight to show that the cards can be clicked

This commit is contained in:
howard-stearns 2016-07-29 15:49:20 -07:00
parent ae9421f1f6
commit 611223f013
2 changed files with 8 additions and 0 deletions

View file

@ -82,7 +82,10 @@ Window {
thumbnail: model.thumbnail;
placeText: model.name;
usersText: model.online_users + ((model.online_users === 1) ? ' person' : ' people');
hoverThunk: function () { ListView.view.currentIndex = index; }
unhoverThunk: function () { ListView.view.currentIndex = -1; }
}
highlight: Rectangle { color: "transparent"; border.width: 2; border.color: "#1FA5E8"; z: 1; }
}
Image {

View file

@ -89,10 +89,15 @@ Rectangle {
margins: textPadding;
}
}
property var hoverThunk: function () { };
property var unhoverThunk: function () { };
MouseArea {
id: zmouseArea;
anchors.fill: parent;
acceptedButtons: Qt.LeftButton;
onClicked: goFunction(parent);
hoverEnabled: true;
onEntered: hoverThunk();
onExited: unhoverThunk();
}
}