mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 21:43:58 +02:00
fixed merge conflict
This commit is contained in:
commit
e46d9da98f
13 changed files with 156 additions and 200 deletions
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
viewBox="0 0 50 150" style="enable-background:new 0 0 50 150;" xml:space="preserve">
|
viewBox="0 0 50 150" style="enable-background:new 0 0 50 150;" xml:space="preserve">
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.st0{fill:#414042;}
|
.st0{fill:#414042;}
|
||||||
|
@ -8,21 +8,16 @@
|
||||||
.st2{fill:#1398BB;}
|
.st2{fill:#1398BB;}
|
||||||
.st3{fill:#31D8FF;}
|
.st3{fill:#31D8FF;}
|
||||||
</style>
|
</style>
|
||||||
<g id="Layer_1">
|
<path class="st0" d="M33.4,87.4L22.1,76.1l-0.9-0.9l0.9-0.9l11.5-11.5c0.7-0.7,0.7-1.9,0-2.7c-0.3-0.3-0.8-0.5-1.3-0.5
|
||||||
<path class="st0" d="M33.72,85.08l-9.15-9.15l-0.74-0.74l0.74-0.74l9.35-9.35c0.59-0.59,0.59-1.56,0-2.15
|
s-1,0.2-1.3,0.5L15.9,75.2l14.9,14.9c0.4,0.4,0.8,0.6,1.3,0.6c0.5,0,1-0.2,1.3-0.6C34.2,89.3,34.2,88.2,33.4,87.4z"/>
|
||||||
c-0.29-0.29-0.67-0.45-1.08-0.45c-0.41,0-0.79,0.16-1.08,0.45L19.52,75.19l12.04,12.04c0.29,0.29,0.67,0.45,1.08,0.45
|
<path class="st1" d="M33.4,37.1L22.1,25.8l-0.9-0.9l0.9-0.9l11.5-11.5c0.7-0.7,0.7-1.9,0-2.7c-0.3-0.4-0.8-0.6-1.3-0.6
|
||||||
c0.41,0,0.79-0.16,1.08-0.45C34.31,86.64,34.31,85.67,33.72,85.08z"/>
|
s-1,0.2-1.3,0.6L15.9,24.9l14.9,14.9c0.4,0.4,0.8,0.5,1.3,0.5c0.5,0,1-0.2,1.3-0.5C34.2,39,34.2,37.8,33.4,37.1z"/>
|
||||||
<path class="st1" d="M33.72,33.45l-9.15-9.15l-0.74-0.74l0.74-0.74l9.35-9.35c0.59-0.59,0.59-1.56,0-2.15
|
<path class="st2" d="M14.1,124.8l15.8,15.8c1.2,1.2,3.2,1.2,4.5,0c1.2-1.2,1.2-3.2,0-4.5L23,124.8l11.5-11.5c1.2-1.2,1.2-3.2,0-4.5
|
||||||
c-0.29-0.29-0.67-0.45-1.08-0.45c-0.41,0-0.79,0.16-1.08,0.45L19.52,23.56L31.56,35.6c0.29,0.29,0.67,0.45,1.08,0.45
|
c-1.2-1.2-3.2-1.2-4.5,0L14.1,124.8z"/>
|
||||||
c0.41,0,0.79-0.16,1.08-0.45C34.31,35.01,34.31,34.04,33.72,33.45z"/>
|
<path class="st3" d="M32.4,109.2c0.5,0,1,0.2,1.3,0.6c0.7,0.7,0.7,1.9,0,2.7l-11.5,11.5l-0.9,0.9l0.9,0.9l11.3,11.3
|
||||||
<path class="st2" d="M17.99,124.82l12.78,12.78c1,1,2.63,1,3.63,0c1-1,1-2.63,0-3.63l-9.15-9.15l9.35-9.35c1-1,1-2.63,0-3.63
|
c0.7,0.7,0.7,1.9,0,2.7c-0.4,0.4-0.8,0.6-1.3,0.6s-1-0.2-1.3-0.6l-14.9-14.9L31,109.7C31.4,109.4,31.9,109.2,32.4,109.2 M32.4,107.9
|
||||||
c-1-1-2.63-1-3.63,0L17.99,124.82z"/>
|
c-0.8,0-1.6,0.3-2.2,0.9l-16,16l15.8,15.8c0.6,0.6,1.4,0.9,2.2,0.9s1.6-0.3,2.2-0.9c1.2-1.2,1.2-3.2,0-4.5l-11.3-11.3l11.5-11.6
|
||||||
<path class="st3" d="M32.79,112.13c0.41,0,0.79,0.16,1.08,0.45c0.59,0.59,0.59,1.56,0,2.15l-9.35,9.35l-0.74,0.74l0.74,0.74
|
c1.2-1.2,1.2-3.2,0-4.5C34,108.2,33.2,107.9,32.4,107.9L32.4,107.9z"/>
|
||||||
l9.15,9.15c0.59,0.59,0.59,1.56,0,2.15c-0.29,0.29-0.67,0.45-1.08,0.45c-0.41,0-0.79-0.16-1.08-0.45l-12.04-12.04l12.24-12.24
|
|
||||||
C32,112.29,32.38,112.13,32.79,112.13 M32.79,111.08c-0.66,0-1.31,0.25-1.82,0.75l-12.98,12.98l12.78,12.78
|
|
||||||
c0.5,0.5,1.16,0.75,1.82,0.75c0.66,0,1.31-0.25,1.82-0.75c1-1,1-2.63,0-3.63l-9.15-9.15l9.35-9.35c1-1,1-2.63,0-3.63
|
|
||||||
C34.1,111.34,33.44,111.08,32.79,111.08L32.79,111.08z"/>
|
|
||||||
</g>
|
|
||||||
<g id="Layer_2">
|
<g id="Layer_2">
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.5 KiB |
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
<!-- Generator: Adobe Illustrator 19.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
viewBox="0 0 50 150" style="enable-background:new 0 0 50 150;" xml:space="preserve">
|
viewBox="0 0 50 150" style="enable-background:new 0 0 50 150;" xml:space="preserve">
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.st0{fill:#414042;}
|
.st0{fill:#414042;}
|
||||||
|
@ -8,21 +8,16 @@
|
||||||
.st2{fill:#1398BB;}
|
.st2{fill:#1398BB;}
|
||||||
.st3{fill:#31D8FF;}
|
.st3{fill:#31D8FF;}
|
||||||
</style>
|
</style>
|
||||||
<g id="Layer_1">
|
<path class="st0" d="M21.1,60.1c-0.4-0.4-0.8-0.5-1.3-0.5s-1,0.2-1.3,0.5c-0.7,0.7-0.7,1.9,0,2.7l11.5,11.5l0.9,0.9l-0.9,0.9
|
||||||
<path class="st0" d="M21.12,62.95c-0.29-0.29-0.67-0.45-1.08-0.45c-0.41,0-0.79,0.16-1.08,0.45c-0.59,0.59-0.59,1.56,0,2.15
|
L18.6,87.4c-0.7,0.7-0.7,1.9,0,2.7c0.4,0.3,0.8,0.6,1.3,0.6s1-0.2,1.3-0.6l14.9-14.9L21.1,60.1z"/>
|
||||||
l9.35,9.35l0.74,0.74l-0.74,0.74l-9.15,9.15c-0.59,0.59-0.59,1.56,0,2.15c0.29,0.29,0.67,0.45,1.08,0.45
|
<path class="st1" d="M21.1,9.8c-0.4-0.4-0.8-0.6-1.3-0.6s-1,0.2-1.3,0.6c-0.7,0.7-0.7,1.9,0,2.7L29.9,24l0.9,0.9l-0.9,0.9L18.6,37.1
|
||||||
c0.41,0,0.79-0.16,1.08-0.45l12.04-12.04L21.12,62.95z"/>
|
c-0.7,0.7-0.7,1.9,0,2.7c0.4,0.4,0.8,0.5,1.3,0.5s1-0.2,1.3-0.5l14.9-14.9L21.1,9.8z"/>
|
||||||
<path class="st1" d="M21.12,11.32c-0.29-0.29-0.67-0.45-1.08-0.45c-0.41,0-0.79,0.16-1.08,0.45c-0.59,0.59-0.59,1.56,0,2.15
|
<path class="st2" d="M38,124.8l-15.8,15.8c-1.2,1.2-3.2,1.2-4.5,0c-1.2-1.2-1.2-3.2,0-4.5L29,124.8l-11.5-11.5
|
||||||
l9.35,9.35l0.74,0.74l-0.74,0.74l-9.15,9.15c-0.59,0.59-0.59,1.56,0,2.15c0.29,0.29,0.67,0.45,1.08,0.45
|
c-1.2-1.2-1.2-3.2,0-4.5c1.2-1.2,3.2-1.2,4.5,0L38,124.8z"/>
|
||||||
c0.41,0,0.79-0.16,1.08-0.45l12.04-12.04L21.12,11.32z"/>
|
<path class="st3" d="M19.7,109.2c0.5,0,1,0.2,1.3,0.6l15.1,15.1l-14.9,14.9c-0.4,0.4-0.8,0.6-1.3,0.6s-1-0.2-1.3-0.6
|
||||||
<path class="st2" d="M34.9,124.82L22.11,137.6c-1,1-2.63,1-3.63,0c-1-1-1-2.63,0-3.63l9.15-9.15l-9.35-9.35c-1-1-1-2.63,0-3.63
|
c-0.7-0.7-0.7-1.9,0-2.7l11.3-11.3l0.9-0.9l-0.9-0.9l-11.5-11.5c-0.7-0.7-0.7-1.9,0-2.7C18.8,109.4,19.2,109.2,19.7,109.2
|
||||||
c1-1,2.63-1,3.63,0L34.9,124.82z"/>
|
M19.7,107.9c-0.8,0-1.6,0.3-2.2,0.9c-1.2,1.2-1.2,3.2,0,4.5L29,124.8l-11.3,11.3c-1.2,1.2-1.2,3.2,0,4.5c0.6,0.6,1.4,0.9,2.2,0.9
|
||||||
<path class="st3" d="M20.1,112.13c0.41,0,0.79,0.16,1.08,0.45l12.24,12.24l-12.04,12.04c-0.29,0.29-0.67,0.45-1.08,0.45
|
s1.6-0.3,2.2-0.9L38,124.8l-16-16C21.4,108.2,20.5,107.9,19.7,107.9L19.7,107.9z"/>
|
||||||
c-0.41,0-0.79-0.16-1.08-0.45c-0.59-0.59-0.59-1.56,0-2.15l9.15-9.15l0.74-0.74l-0.74-0.74l-9.35-9.35c-0.59-0.59-0.59-1.56,0-2.15
|
|
||||||
C19.31,112.29,19.69,112.13,20.1,112.13 M20.1,111.08c-0.66,0-1.31,0.25-1.82,0.75c-1,1-1,2.63,0,3.63l9.35,9.35l-9.15,9.15
|
|
||||||
c-1,1-1,2.63,0,3.63c0.5,0.5,1.16,0.75,1.82,0.75s1.31-0.25,1.82-0.75l12.78-12.78l-12.98-12.98
|
|
||||||
C21.41,111.34,20.76,111.08,20.1,111.08L20.1,111.08z"/>
|
|
||||||
</g>
|
|
||||||
<g id="Layer_2">
|
<g id="Layer_2">
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.5 KiB |
|
@ -20,8 +20,10 @@ import "../toolbars"
|
||||||
import "../../styles-uit" as HifiStyles
|
import "../../styles-uit" as HifiStyles
|
||||||
import "../../controls-uit" as HifiControls
|
import "../../controls-uit" as HifiControls
|
||||||
|
|
||||||
|
// references HMD, AddressManager, AddressBarDialog from root context
|
||||||
|
|
||||||
StackView {
|
StackView {
|
||||||
id: root
|
id: root;
|
||||||
HifiConstants { id: hifi }
|
HifiConstants { id: hifi }
|
||||||
HifiStyles.HifiConstants { id: hifiStyleConstants }
|
HifiStyles.HifiConstants { id: hifiStyleConstants }
|
||||||
initialItem: addressBarDialog
|
initialItem: addressBarDialog
|
||||||
|
@ -34,24 +36,16 @@ StackView {
|
||||||
property string metaverseBase: addressBarDialog.metaverseServerUrl + "/api/v1/";
|
property string metaverseBase: addressBarDialog.metaverseServerUrl + "/api/v1/";
|
||||||
|
|
||||||
property var tablet: null;
|
property var tablet: null;
|
||||||
property bool isDesktop: false;
|
|
||||||
|
|
||||||
Component { id: tabletWebView; TabletWebView {} }
|
Component { id: tabletWebView; TabletWebView {} }
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
root.currentItem.focus = true;
|
|
||||||
root.currentItem.forceActiveFocus();
|
|
||||||
addressLine.focus = true;
|
|
||||||
addressLine.forceActiveFocus();
|
|
||||||
fillDestinations();
|
fillDestinations();
|
||||||
updateLocationText(false);
|
updateLocationText(false);
|
||||||
|
fillDestinations();
|
||||||
|
addressLine.focus = !HMD.active;
|
||||||
root.parentChanged.connect(center);
|
root.parentChanged.connect(center);
|
||||||
center();
|
center();
|
||||||
isDesktop = (typeof desktop !== "undefined");
|
|
||||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||||
|
|
||||||
if (desktop) {
|
|
||||||
root.title = "GOTO";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Component.onDestruction: {
|
Component.onDestruction: {
|
||||||
root.parentChanged.disconnect(center);
|
root.parentChanged.disconnect(center);
|
||||||
|
@ -79,8 +73,6 @@ StackView {
|
||||||
clearAddressLineTimer.start();
|
clearAddressLineTimer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
property bool isCursorVisible: false // Override default cursor visibility.
|
|
||||||
|
|
||||||
|
|
||||||
AddressBarDialog {
|
AddressBarDialog {
|
||||||
id: addressBarDialog
|
id: addressBarDialog
|
||||||
|
@ -102,16 +94,11 @@ StackView {
|
||||||
onMetaverseServerUrlChanged: updateLocationTextTimer.start();
|
onMetaverseServerUrlChanged: updateLocationTextTimer.start();
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: navBar
|
id: navBar
|
||||||
width: 480
|
width: parent.width
|
||||||
height: 70
|
height: 50;
|
||||||
color: hifiStyleConstants.colors.white
|
color: hifiStyleConstants.colors.white
|
||||||
anchors {
|
anchors.top: parent.top;
|
||||||
top: parent.top
|
anchors.left: parent.left;
|
||||||
right: parent.right
|
|
||||||
rightMargin: 0
|
|
||||||
left: parent.left
|
|
||||||
leftMargin: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolbarButton {
|
ToolbarButton {
|
||||||
id: homeButton
|
id: homeButton
|
||||||
|
@ -129,8 +116,14 @@ StackView {
|
||||||
}
|
}
|
||||||
ToolbarButton {
|
ToolbarButton {
|
||||||
id: backArrow;
|
id: backArrow;
|
||||||
|
buttonState: addressBarDialog.backEnabled;
|
||||||
imageURL: "../../../images/backward.svg";
|
imageURL: "../../../images/backward.svg";
|
||||||
onClicked: addressBarDialog.loadBack();
|
buttonEnabled: addressBarDialog.backEnabled;
|
||||||
|
onClicked: {
|
||||||
|
if (buttonEnabled) {
|
||||||
|
addressBarDialog.loadBack();
|
||||||
|
}
|
||||||
|
}
|
||||||
anchors {
|
anchors {
|
||||||
left: homeButton.right
|
left: homeButton.right
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
|
@ -138,8 +131,14 @@ StackView {
|
||||||
}
|
}
|
||||||
ToolbarButton {
|
ToolbarButton {
|
||||||
id: forwardArrow;
|
id: forwardArrow;
|
||||||
|
buttonState: addressBarDialog.forwardEnabled;
|
||||||
imageURL: "../../../images/forward.svg";
|
imageURL: "../../../images/forward.svg";
|
||||||
onClicked: addressBarDialog.loadForward();
|
buttonEnabled: addressBarDialog.forwardEnabled;
|
||||||
|
onClicked: {
|
||||||
|
if (buttonEnabled) {
|
||||||
|
addressBarDialog.loadForward();
|
||||||
|
}
|
||||||
|
}
|
||||||
anchors {
|
anchors {
|
||||||
left: backArrow.right
|
left: backArrow.right
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
|
@ -149,85 +148,80 @@ StackView {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: addressBar
|
id: addressBar
|
||||||
width: 480
|
width: parent.width
|
||||||
height: 70
|
height: 70
|
||||||
color: hifiStyleConstants.colors.white
|
color: hifiStyleConstants.colors.white
|
||||||
anchors {
|
anchors {
|
||||||
top: navBar.bottom
|
top: navBar.bottom;
|
||||||
right: parent.right
|
left: parent.left;
|
||||||
rightMargin: 16
|
|
||||||
left: parent.left
|
|
||||||
leftMargin: 16
|
|
||||||
}
|
}
|
||||||
|
|
||||||
property int inputAreaHeight: 70
|
|
||||||
property int inputAreaStep: (height - inputAreaHeight) / 2
|
|
||||||
|
|
||||||
HifiStyles.RalewayLight {
|
HifiStyles.RalewayLight {
|
||||||
id: notice;
|
id: notice;
|
||||||
font.pixelSize: hifi.fonts.pixelSize * 0.50;
|
font.pixelSize: hifi.fonts.pixelSize * 0.7;
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top;
|
||||||
topMargin: parent.inputAreaStep + 12
|
left: addressLineContainer.left;
|
||||||
left: addressLine.left
|
right: addressLineContainer.right;
|
||||||
right: addressLine.right
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiStyles.FiraSansRegular {
|
HifiStyles.FiraSansRegular {
|
||||||
id: location;
|
id: location;
|
||||||
|
anchors {
|
||||||
|
left: addressLineContainer.left;
|
||||||
|
leftMargin: 8;
|
||||||
|
verticalCenter: addressLineContainer.verticalCenter;
|
||||||
|
}
|
||||||
font.pixelSize: addressLine.font.pixelSize;
|
font.pixelSize: addressLine.font.pixelSize;
|
||||||
color: "gray";
|
color: "gray";
|
||||||
clip: true;
|
clip: true;
|
||||||
anchors.fill: addressLine;
|
|
||||||
visible: addressLine.text.length === 0
|
visible: addressLine.text.length === 0
|
||||||
}
|
}
|
||||||
|
|
||||||
TextInput {
|
TextInput {
|
||||||
id: addressLine
|
id: addressLine
|
||||||
focus: true
|
width: addressLineContainer.width - addressLineContainer.anchors.leftMargin - addressLineContainer.anchors.rightMargin;
|
||||||
anchors {
|
anchors {
|
||||||
bottom: parent.bottom
|
left: addressLineContainer.left;
|
||||||
left: parent.left
|
leftMargin: 8;
|
||||||
right: parent.right
|
verticalCenter: addressLineContainer.verticalCenter;
|
||||||
leftMargin: 16
|
|
||||||
rightMargin: 16
|
|
||||||
topMargin: parent.inputAreaStep + (2 * hifi.layout.spacing)
|
|
||||||
bottomMargin: parent.inputAreaStep
|
|
||||||
}
|
}
|
||||||
font.pixelSize: hifi.fonts.pixelSize * 0.75
|
font.pixelSize: hifi.fonts.pixelSize * 0.75
|
||||||
cursorVisible: false
|
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
filterChoicesByText();
|
filterChoicesByText();
|
||||||
updateLocationText(text.length > 0);
|
updateLocationText(text.length > 0);
|
||||||
if (!isCursorVisible && text.length > 0) {
|
|
||||||
isCursorVisible = true;
|
|
||||||
cursorVisible = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
addressBarDialog.keyboardEnabled = false;
|
addressBarDialog.keyboardEnabled = false;
|
||||||
}
|
toggleOrGo();
|
||||||
onActiveFocusChanged: {
|
|
||||||
cursorVisible = isCursorVisible && focus;
|
|
||||||
}
|
|
||||||
MouseArea {
|
|
||||||
// If user clicks in address bar show cursor to indicate ability to enter address.
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: {
|
|
||||||
isCursorVisible = true;
|
|
||||||
parent.cursorVisible = true;
|
|
||||||
parent.focus = true;
|
|
||||||
parent.forceActiveFocus();
|
|
||||||
addressBarDialog.keyboardEnabled = HMD.active
|
|
||||||
tabletRoot.playButtonClickSound();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: addressLine
|
id: addressLineContainer;
|
||||||
|
height: 40;
|
||||||
|
anchors {
|
||||||
|
top: notice.bottom;
|
||||||
|
topMargin: 2;
|
||||||
|
left: parent.left;
|
||||||
|
leftMargin: 16;
|
||||||
|
right: parent.right;
|
||||||
|
rightMargin: 16;
|
||||||
|
}
|
||||||
color: hifiStyleConstants.colors.lightGray
|
color: hifiStyleConstants.colors.lightGray
|
||||||
opacity: 0.1
|
opacity: 0.1
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent;
|
||||||
|
onClicked: {
|
||||||
|
if (!addressLine.focus || !HMD.active) {
|
||||||
|
addressLine.focus = true;
|
||||||
|
addressLine.forceActiveFocus();
|
||||||
|
addressBarDialog.keyboardEnabled = HMD.active;
|
||||||
|
}
|
||||||
|
tabletRoot.playButtonClickSound();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -347,13 +341,12 @@ StackView {
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
// Delay clearing address line so as to avoid flicker of "not connected" being displayed after entering an address.
|
// Delay clearing address line so as to avoid flicker of "not connected" being displayed after entering an address.
|
||||||
id: clearAddressLineTimer
|
id: clearAddressLineTimer;
|
||||||
running: false
|
running: false;
|
||||||
interval: 100 // ms
|
interval: 100; // ms
|
||||||
repeat: false
|
repeat: false;
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
addressLine.text = "";
|
addressLine.text = "";
|
||||||
isCursorVisible = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -535,7 +528,7 @@ StackView {
|
||||||
|
|
||||||
function updateLocationText(enteringAddress) {
|
function updateLocationText(enteringAddress) {
|
||||||
if (enteringAddress) {
|
if (enteringAddress) {
|
||||||
notice.text = "Go to a place, @user, path or network address";
|
notice.text = "Go To a place, @user, path, or network address:";
|
||||||
notice.color = hifiStyleConstants.colors.baseGrayHighlight;
|
notice.color = hifiStyleConstants.colors.baseGrayHighlight;
|
||||||
} else {
|
} else {
|
||||||
notice.text = AddressManager.isConnected ? "Your location:" : "Not Connected";
|
notice.text = AddressManager.isConnected ? "Your location:" : "Not Connected";
|
||||||
|
@ -545,46 +538,14 @@ StackView {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onVisibleChanged: {
|
|
||||||
updateLocationText(false);
|
|
||||||
if (visible) {
|
|
||||||
addressLine.forceActiveFocus();
|
|
||||||
fillDestinations();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleOrGo(fromSuggestions, address) {
|
function toggleOrGo(fromSuggestions, address) {
|
||||||
if (address !== undefined && address !== "") {
|
if (address !== undefined && address !== "") {
|
||||||
addressBarDialog.loadAddress(address, fromSuggestions)
|
addressBarDialog.loadAddress(address, fromSuggestions);
|
||||||
}
|
|
||||||
|
|
||||||
if (addressLine.text !== "") {
|
|
||||||
addressBarDialog.loadAddress(addressLine.text, fromSuggestions)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isDesktop) {
|
|
||||||
tablet.gotoHomeScreen();
|
|
||||||
} else {
|
|
||||||
HMD.closeTablet();
|
|
||||||
}
|
|
||||||
|
|
||||||
tabletRoot.shown = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Keys.onPressed: {
|
|
||||||
switch (event.key) {
|
|
||||||
case Qt.Key_Escape:
|
|
||||||
case Qt.Key_Back:
|
|
||||||
tabletRoot.shown = false
|
|
||||||
clearAddressLineTimer.start();
|
clearAddressLineTimer.start();
|
||||||
event.accepted = true
|
} else if (addressLine.text !== "") {
|
||||||
break
|
addressBarDialog.loadAddress(addressLine.text, fromSuggestions);
|
||||||
case Qt.Key_Enter:
|
|
||||||
case Qt.Key_Return:
|
|
||||||
toggleOrGo()
|
|
||||||
clearAddressLineTimer.start();
|
clearAddressLineTimer.start();
|
||||||
event.accepted = true
|
}
|
||||||
break
|
DialogsManager.hideAddressBar();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@ import QtQuick.Controls 1.4
|
||||||
|
|
||||||
StateImage {
|
StateImage {
|
||||||
id: button
|
id: button
|
||||||
|
|
||||||
|
property bool buttonEnabled: true
|
||||||
property bool isActive: false
|
property bool isActive: false
|
||||||
property bool isEntered: false
|
property bool isEntered: false
|
||||||
|
|
||||||
|
@ -39,6 +41,7 @@ StateImage {
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateState() {
|
function updateState() {
|
||||||
|
if (buttonEnabled) {
|
||||||
if (!button.isEntered && !button.isActive) {
|
if (!button.isEntered && !button.isActive) {
|
||||||
buttonState = imageOffOut;
|
buttonState = imageOffOut;
|
||||||
} else if (!button.isEntered && button.isActive) {
|
} else if (!button.isEntered && button.isActive) {
|
||||||
|
@ -48,21 +51,27 @@ StateImage {
|
||||||
} else {
|
} else {
|
||||||
buttonState = imageOnIn;
|
buttonState = imageOnIn;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
buttonState = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onIsActiveChanged: updateState();
|
onIsActiveChanged: updateState();
|
||||||
|
onButtonEnabledChanged: updateState();
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: asyncClickSender
|
id: asyncClickSender
|
||||||
interval: 10
|
interval: 10
|
||||||
repeat: false
|
repeat: false
|
||||||
running: false
|
running: false
|
||||||
onTriggered: button.clicked();
|
onTriggered: {
|
||||||
|
button.clicked();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
hoverEnabled: true
|
hoverEnabled: buttonEnabled
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: asyncClickSender.start();
|
onClicked: asyncClickSender.start();
|
||||||
onEntered: {
|
onEntered: {
|
||||||
|
|
|
@ -1420,11 +1420,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
connect(DependencyManager::get<AudioClient>().data(), &AudioClient::mutedByMixer, this, onMutedByMixer);
|
connect(DependencyManager::get<AudioClient>().data(), &AudioClient::mutedByMixer, this, onMutedByMixer);
|
||||||
|
|
||||||
// Track when the address bar is opened
|
// Track when the address bar is opened
|
||||||
auto onAddressBarToggled = [this]() {
|
auto onAddressBarShown = [this]() {
|
||||||
// Record time
|
// Record time
|
||||||
UserActivityLogger::getInstance().logAction("opened_address_bar", { { "uptime_ms", _sessionRunTimer.elapsed() } });
|
UserActivityLogger::getInstance().logAction("opened_address_bar", { { "uptime_ms", _sessionRunTimer.elapsed() } });
|
||||||
};
|
};
|
||||||
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::addressBarToggled, this, onAddressBarToggled);
|
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::addressBarShown, this, onAddressBarShown);
|
||||||
|
|
||||||
// Make sure we don't time out during slow operations at startup
|
// Make sure we don't time out during slow operations at startup
|
||||||
updateHeartbeat();
|
updateHeartbeat();
|
||||||
|
|
|
@ -254,7 +254,7 @@ Menu::Menu() {
|
||||||
|
|
||||||
// Navigate > Show Address Bar
|
// Navigate > Show Address Bar
|
||||||
addActionToQMenuAndActionHash(navigateMenu, MenuOption::AddressBar, Qt::CTRL | Qt::Key_L,
|
addActionToQMenuAndActionHash(navigateMenu, MenuOption::AddressBar, Qt::CTRL | Qt::Key_L,
|
||||||
dialogsManager.data(), SLOT(toggleAddressBar()));
|
dialogsManager.data(), SLOT(showAddressBar()));
|
||||||
|
|
||||||
// Navigate > Bookmark related menus -- Note: the Bookmark class adds its own submenus here.
|
// Navigate > Bookmark related menus -- Note: the Bookmark class adds its own submenus here.
|
||||||
qApp->getBookmarks()->setupMenus(this, navigateMenu);
|
qApp->getBookmarks()->setupMenus(this, navigateMenu);
|
||||||
|
|
|
@ -16,15 +16,24 @@
|
||||||
#include "ui/DialogsManager.h"
|
#include "ui/DialogsManager.h"
|
||||||
|
|
||||||
DialogsManagerScriptingInterface::DialogsManagerScriptingInterface() {
|
DialogsManagerScriptingInterface::DialogsManagerScriptingInterface() {
|
||||||
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::addressBarToggled,
|
|
||||||
this, &DialogsManagerScriptingInterface::addressBarToggled);
|
|
||||||
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::addressBarShown,
|
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::addressBarShown,
|
||||||
this, &DialogsManagerScriptingInterface::addressBarShown);
|
this, &DialogsManagerScriptingInterface::addressBarShown);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogsManagerScriptingInterface::toggleAddressBar() {
|
|
||||||
|
DialogsManagerScriptingInterface* DialogsManagerScriptingInterface::getInstance() {
|
||||||
|
static DialogsManagerScriptingInterface sharedInstance;
|
||||||
|
return &sharedInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DialogsManagerScriptingInterface::showAddressBar() {
|
||||||
QMetaObject::invokeMethod(DependencyManager::get<DialogsManager>().data(),
|
QMetaObject::invokeMethod(DependencyManager::get<DialogsManager>().data(),
|
||||||
"toggleAddressBar", Qt::QueuedConnection);
|
"showAddressBar", Qt::QueuedConnection);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DialogsManagerScriptingInterface::hideAddressBar() {
|
||||||
|
QMetaObject::invokeMethod(DependencyManager::get<DialogsManager>().data(),
|
||||||
|
"hideAddressBar", Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogsManagerScriptingInterface::showFeed() {
|
void DialogsManagerScriptingInterface::showFeed() {
|
||||||
|
|
|
@ -18,13 +18,14 @@ class DialogsManagerScriptingInterface : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
DialogsManagerScriptingInterface();
|
DialogsManagerScriptingInterface();
|
||||||
|
static DialogsManagerScriptingInterface* getInstance();
|
||||||
Q_INVOKABLE void showFeed();
|
Q_INVOKABLE void showFeed();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void toggleAddressBar();
|
void showAddressBar();
|
||||||
|
void hideAddressBar();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void addressBarToggled();
|
|
||||||
void addressBarShown(bool visible);
|
void addressBarShown(bool visible);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -46,49 +46,32 @@ void DialogsManager::maybeCreateDialog(QPointer<T>& member) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogsManager::toggleAddressBar() {
|
|
||||||
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
|
||||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
|
||||||
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
|
||||||
if (tablet->getToolbarMode()) {
|
|
||||||
if (tablet->isPathLoaded(TABLET_ADDRESS_DIALOG)) {
|
|
||||||
tablet->gotoHomeScreen();
|
|
||||||
emit addressBarToggled();
|
|
||||||
} else {
|
|
||||||
tablet->loadQMLSource(TABLET_ADDRESS_DIALOG);
|
|
||||||
emit addressBarToggled();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (hmd->getShouldShowTablet()) {
|
|
||||||
if (tablet->isPathLoaded(TABLET_ADDRESS_DIALOG) && _closeAddressBar) {
|
|
||||||
tablet->gotoHomeScreen();
|
|
||||||
hmd->closeTablet();
|
|
||||||
_closeAddressBar = false;
|
|
||||||
emit addressBarToggled();
|
|
||||||
} else {
|
|
||||||
tablet->loadQMLSource(TABLET_ADDRESS_DIALOG);
|
|
||||||
_closeAddressBar = true;
|
|
||||||
emit addressBarToggled();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
tablet->loadQMLSource(TABLET_ADDRESS_DIALOG);
|
|
||||||
hmd->openTablet();
|
|
||||||
_closeAddressBar = true;
|
|
||||||
emit addressBarToggled();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void DialogsManager::showAddressBar() {
|
void DialogsManager::showAddressBar() {
|
||||||
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||||
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
||||||
tablet->loadQMLSource(TABLET_ADDRESS_DIALOG);
|
|
||||||
|
|
||||||
|
if (!tablet->isPathLoaded(TABLET_ADDRESS_DIALOG)) {
|
||||||
|
tablet->loadQMLSource(TABLET_ADDRESS_DIALOG);
|
||||||
|
}
|
||||||
if (!hmd->getShouldShowTablet()) {
|
if (!hmd->getShouldShowTablet()) {
|
||||||
hmd->openTablet();
|
hmd->openTablet();
|
||||||
}
|
}
|
||||||
|
qApp->setKeyboardFocusOverlay(hmd->getCurrentTabletScreenID());
|
||||||
|
emit addressBarShown(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DialogsManager::hideAddressBar() {
|
||||||
|
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||||
|
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||||
|
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
||||||
|
|
||||||
|
if (tablet->isPathLoaded(TABLET_ADDRESS_DIALOG)) {
|
||||||
|
tablet->gotoHomeScreen();
|
||||||
|
hmd->closeTablet();
|
||||||
|
}
|
||||||
|
qApp->setKeyboardFocusOverlay(UNKNOWN_OVERLAY_ID);
|
||||||
|
emit addressBarShown(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogsManager::showFeed() {
|
void DialogsManager::showFeed() {
|
||||||
|
|
|
@ -41,8 +41,8 @@ public:
|
||||||
void emitAddressBarShown(bool visible) { emit addressBarShown(visible); }
|
void emitAddressBarShown(bool visible) { emit addressBarShown(visible); }
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void toggleAddressBar();
|
|
||||||
void showAddressBar();
|
void showAddressBar();
|
||||||
|
void hideAddressBar();
|
||||||
void showFeed();
|
void showFeed();
|
||||||
void setDomainConnectionFailureVisibility(bool visible);
|
void setDomainConnectionFailureVisibility(bool visible);
|
||||||
void toggleLoginDialog();
|
void toggleLoginDialog();
|
||||||
|
@ -57,7 +57,6 @@ public slots:
|
||||||
void showUpdateDialog();
|
void showUpdateDialog();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void addressBarToggled();
|
|
||||||
void addressBarShown(bool visible);
|
void addressBarShown(bool visible);
|
||||||
void setUseFeed(bool useFeed);
|
void setUseFeed(bool useFeed);
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,9 @@ void SnapshotUploader::uploadSuccess(QNetworkReply& reply) {
|
||||||
QJsonObject userStoryObject;
|
QJsonObject userStoryObject;
|
||||||
QJsonObject detailsObject;
|
QJsonObject detailsObject;
|
||||||
detailsObject.insert("image_url", imageUrl);
|
detailsObject.insert("image_url", imageUrl);
|
||||||
|
if (dataObject.contains("shareable_url")) {
|
||||||
|
detailsObject.insert("shareable_url", dataObject.value("shareable_url").toString());
|
||||||
|
}
|
||||||
QString pickledDetails = QJsonDocument(detailsObject).toJson();
|
QString pickledDetails = QJsonDocument(detailsObject).toJson();
|
||||||
userStoryObject.insert("details", pickledDetails);
|
userStoryObject.insert("details", pickledDetails);
|
||||||
userStoryObject.insert("thumbnail_url", thumbnailUrl);
|
userStoryObject.insert("thumbnail_url", thumbnailUrl);
|
||||||
|
|
|
@ -198,6 +198,7 @@ void Web3DOverlay::loadSourceURL() {
|
||||||
_webSurface->getRootContext()->setContextProperty("AvatarInputs", AvatarInputs::getInstance());
|
_webSurface->getRootContext()->setContextProperty("AvatarInputs", AvatarInputs::getInstance());
|
||||||
_webSurface->getRootContext()->setContextProperty("GlobalServices", GlobalServicesScriptingInterface::getInstance());
|
_webSurface->getRootContext()->setContextProperty("GlobalServices", GlobalServicesScriptingInterface::getInstance());
|
||||||
_webSurface->getRootContext()->setContextProperty("AvatarList", DependencyManager::get<AvatarManager>().data());
|
_webSurface->getRootContext()->setContextProperty("AvatarList", DependencyManager::get<AvatarManager>().data());
|
||||||
|
_webSurface->getRootContext()->setContextProperty("DialogsManager", DialogsManagerScriptingInterface::getInstance());
|
||||||
|
|
||||||
_webSurface->getRootContext()->setContextProperty("pathToFonts", "../../");
|
_webSurface->getRootContext()->setContextProperty("pathToFonts", "../../");
|
||||||
tabletScriptingInterface->setQmlTabletRoot("com.highfidelity.interface.tablet.system", _webSurface->getRootItem(), _webSurface.data());
|
tabletScriptingInterface->setQmlTabletRoot("com.highfidelity.interface.tablet.system", _webSurface->getRootItem(), _webSurface.data());
|
||||||
|
|
|
@ -41,7 +41,7 @@ public:
|
||||||
Q_INVOKABLE QVector<QUuid> getAvatarIdentifiers();
|
Q_INVOKABLE QVector<QUuid> getAvatarIdentifiers();
|
||||||
|
|
||||||
// Null/Default-constructed QUuids will return MyAvatar
|
// Null/Default-constructed QUuids will return MyAvatar
|
||||||
virtual ScriptAvatarData* getAvatar(QUuid avatarID) { return new ScriptAvatarData(getAvatarBySessionID(avatarID)); }
|
Q_INVOKABLE virtual ScriptAvatarData* getAvatar(QUuid avatarID) { return new ScriptAvatarData(getAvatarBySessionID(avatarID)); }
|
||||||
|
|
||||||
virtual AvatarSharedPointer getAvatarBySessionID(const QUuid& sessionID) const { return findAvatar(sessionID); }
|
virtual AvatarSharedPointer getAvatarBySessionID(const QUuid& sessionID) const { return findAvatar(sessionID); }
|
||||||
int numberOfAvatarsInRange(const glm::vec3& position, float rangeMeters);
|
int numberOfAvatarsInRange(const glm::vec3& position, float rangeMeters);
|
||||||
|
|
Loading…
Reference in a new issue