diff --git a/interface/resources/qml/hifi/simplifiedUI/avatarApp/AvatarApp.qml b/interface/resources/qml/hifi/simplifiedUI/avatarApp/AvatarApp.qml index d6ee593edd..4c6615ebdc 100644 --- a/interface/resources/qml/hifi/simplifiedUI/avatarApp/AvatarApp.qml +++ b/interface/resources/qml/hifi/simplifiedUI/avatarApp/AvatarApp.qml @@ -12,6 +12,7 @@ import QtQuick 2.10 import "../simplifiedConstants" as SimplifiedConstants import "./components" as AvatarAppComponents import stylesUit 1.0 as HifiStylesUit +import TabletScriptingInterface 1.0 import "qrc:////qml//hifi//models" as HifiModels // Absolute path so the same code works everywhere. Rectangle { @@ -99,6 +100,33 @@ Rectangle { } } + Image { + id: homeButton + source: "images/homeIcon.svg" + opacity: homeButtonMouseArea.containsMouse ? 1.0 : 0.7 + anchors.top: parent.top + anchors.topMargin: 15 + anchors.right: parent.right + anchors.rightMargin: 24 + width: 14 + height: 13 + + MouseArea { + id: homeButtonMouseArea + anchors.fill: parent + hoverEnabled: true + onEntered: { + Tablet.playSound(TabletEnums.ButtonHover); + } + onClicked: { + Tablet.playSound(TabletEnums.ButtonClick); + // Can't use `Window.location` in QML, so just use what setting `Window.location` actually calls under the hood: + // AddressManager.handleLookupString(). + AddressManager.handleLookupString(LocationBookmarks.getHomeLocationAddress()); + } + } + } + AvatarAppComponents.DisplayNameHeader { id: displayNameHeader previewUrl: root.avatarPreviewUrl diff --git a/interface/resources/qml/hifi/simplifiedUI/avatarApp/images/homeIcon.svg b/interface/resources/qml/hifi/simplifiedUI/avatarApp/images/homeIcon.svg new file mode 100644 index 0000000000..1aae14e2dd --- /dev/null +++ b/interface/resources/qml/hifi/simplifiedUI/avatarApp/images/homeIcon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/scripts/simplifiedUI/ui/simplifiedUI.js b/scripts/simplifiedUI/ui/simplifiedUI.js index a6183c5ab9..38d1059da7 100644 --- a/scripts/simplifiedUI/ui/simplifiedUI.js +++ b/scripts/simplifiedUI/ui/simplifiedUI.js @@ -98,7 +98,7 @@ function onAvatarAppClosed() { var AVATAR_APP_QML_PATH = Script.resourcesPath() + "qml/hifi/simplifiedUI/avatarApp/AvatarApp.qml"; -var AVATAR_APP_WINDOW_TITLE = "Your Avatars"; +var AVATAR_APP_WINDOW_TITLE = "Your Profile"; var AVATAR_APP_PRESENTATION_MODE = Desktop.PresentationMode.NATIVE; var AVATAR_APP_WIDTH_PX = 480; var AVATAR_APP_HEIGHT_PX = 615;