From 4d2a37aff2e7acf828f766cba3c99964adbaabe6 Mon Sep 17 00:00:00 2001 From: Alexander Ivash Date: Fri, 27 Apr 2018 20:54:35 +0300 Subject: [PATCH] show add to favorites on clicking star --- interface/resources/qml/hifi/AvatarApp.qml | 27 +++++++++++----------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/interface/resources/qml/hifi/AvatarApp.qml b/interface/resources/qml/hifi/AvatarApp.qml index 9caecd69c3..89798c4969 100644 --- a/interface/resources/qml/hifi/AvatarApp.qml +++ b/interface/resources/qml/hifi/AvatarApp.qml @@ -135,7 +135,6 @@ Rectangle { Row { id: star - anchors.top: parent.top anchors.topMargin: 119 anchors.left: avatarImage.right @@ -153,21 +152,21 @@ Rectangle { TextStyle5 { text: isAvatarInFavorites ? avatarName : "Add to Favorites" anchors.verticalCenter: parent.verticalCenter + } + } - MouseArea { - enabled: !isAvatarInFavorites - anchors.fill: parent - onClicked: { - console.debug('selectedAvatar.url', selectedAvatar.url) - createFavorite.onSaveClicked = function() { - selectedAvatar.favorite = true; - pageOfAvatars.setProperty(view.currentIndex, 'favorite', selectedAvatar.favorite) - createFavorite.close(); - } - - createFavorite.open(selectedAvatar); - } + MouseArea { + enabled: !isAvatarInFavorites + anchors.fill: star + onClicked: { + console.debug('selectedAvatar.url', selectedAvatar.url) + createFavorite.onSaveClicked = function() { + selectedAvatar.favorite = true; + pageOfAvatars.setProperty(view.currentIndex, 'favorite', selectedAvatar.favorite) + createFavorite.close(); } + + createFavorite.open(selectedAvatar); } }