mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 07:03:44 +02:00
show add to favorites on clicking star
This commit is contained in:
parent
bd48ff9ee6
commit
4d2a37aff2
1 changed files with 13 additions and 14 deletions
|
@ -135,7 +135,6 @@ Rectangle {
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: star
|
id: star
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 119
|
anchors.topMargin: 119
|
||||||
anchors.left: avatarImage.right
|
anchors.left: avatarImage.right
|
||||||
|
@ -153,21 +152,21 @@ Rectangle {
|
||||||
TextStyle5 {
|
TextStyle5 {
|
||||||
text: isAvatarInFavorites ? avatarName : "Add to Favorites"
|
text: isAvatarInFavorites ? avatarName : "Add to Favorites"
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
enabled: !isAvatarInFavorites
|
enabled: !isAvatarInFavorites
|
||||||
anchors.fill: parent
|
anchors.fill: star
|
||||||
onClicked: {
|
onClicked: {
|
||||||
console.debug('selectedAvatar.url', selectedAvatar.url)
|
console.debug('selectedAvatar.url', selectedAvatar.url)
|
||||||
createFavorite.onSaveClicked = function() {
|
createFavorite.onSaveClicked = function() {
|
||||||
selectedAvatar.favorite = true;
|
selectedAvatar.favorite = true;
|
||||||
pageOfAvatars.setProperty(view.currentIndex, 'favorite', selectedAvatar.favorite)
|
pageOfAvatars.setProperty(view.currentIndex, 'favorite', selectedAvatar.favorite)
|
||||||
createFavorite.close();
|
createFavorite.close();
|
||||||
}
|
|
||||||
|
|
||||||
createFavorite.open(selectedAvatar);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
createFavorite.open(selectedAvatar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue