mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 18:02:13 +02:00
Merge pull request #15658 from zfox23/homeButton
DEV-92: Add a Home button to the Avatar app
This commit is contained in:
commit
aefda30cf9
3 changed files with 33 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<svg width="14" height="13" viewBox="0 0 14 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0.546497 6.46222C0.68683 6.52762 0.841945 6.5522 0.994929 6.53328C1.08986 6.5539 1.18806 6.55265 1.28246 6.52963C1.37687 6.50661 1.46514 6.46239 1.54094 6.40015L3.30854 5.1924L7.13987 2.44404L12.4889 6.38113C12.5827 6.46758 12.6942 6.53129 12.8152 6.56759C12.9361 6.60388 13.0634 6.61183 13.1878 6.59084C13.3121 6.56985 13.4303 6.52046 13.5336 6.44631C13.6369 6.37216 13.7226 6.27514 13.7846 6.1624C13.8688 6.06517 13.9308 5.94985 13.9662 5.82485C14.0015 5.69986 14.0093 5.56833 13.9889 5.43987C13.9685 5.3114 13.9205 5.18923 13.8483 5.08225C13.7761 4.97528 13.6816 4.88619 13.5717 4.8215L7.13987 0L2.21652 3.5662L0.485918 4.75494C-0.0415861 5.04974 -0.143383 5.51573 0.199032 6.1624C0.285979 6.29313 0.406165 6.39683 0.546497 6.46222Z" fill="white"/>
|
||||
<path d="M6.99182 4.97367L10.3142 7.35113L11.9059 8.53987V13H2.15174V8.38771L3.7435 7.27505L6.99182 4.97367Z" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 990 B |
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue