Merge branch 'master' into feature/openvr-linux

This commit is contained in:
David Rowe 2020-06-25 07:39:38 +12:00
commit 901b3f5234
4 changed files with 63 additions and 36 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -3,10 +3,10 @@
// //
// Created by David Rowe on 3 Jun 2015 // Created by David Rowe on 3 Jun 2015
// Copyright 2015 High Fidelity, Inc. // Copyright 2015 High Fidelity, Inc.
// Copyright 2020 Vircadia contributors.
//
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
//
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
import Hifi 1.0 import Hifi 1.0
import QtQuick 2.4 import QtQuick 2.4

View file

@ -3,6 +3,7 @@
// //
// Created by Clement on 7/18/16 // Created by Clement on 7/18/16
// Copyright 2015 High Fidelity, Inc. // Copyright 2015 High Fidelity, Inc.
// Copyright 2020 Vircadia contributors.
// //
// Distributed under the Apache License, Version 2.0. // Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
@ -486,6 +487,7 @@ Item {
} }
} }
} }
Item { Item {
id: signUpContainer id: signUpContainer
width: loginContainer.width width: loginContainer.width
@ -494,7 +496,7 @@ Item {
anchors { anchors {
left: loginContainer.left left: loginContainer.left
top: loginContainer.bottom top: loginContainer.bottom
topMargin: 0.15 * parent.height topMargin: 0.05 * parent.height
} }
TextMetrics { TextMetrics {
id: signUpTextMetrics id: signUpTextMetrics
@ -542,7 +544,24 @@ Item {
"errorString": "" }); "errorString": "" });
} }
} }
Text {
id: signUpTextSecond
text: qsTr("or")
anchors {
left: signUpShortcutText.right
leftMargin: hifi.dimensions.contentSpacing.x
} }
lineHeight: 1
color: "white"
font.family: linkAccountBody.fontFamily
font.pixelSize: linkAccountBody.textFieldFontSize
font.bold: linkAccountBody.fontBold
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
visible: loginDialog.getLoginDialogPoppedUp() && !linkAccountBody.linkSteam && !linkAccountBody.linkOculus;
}
TextMetrics { TextMetrics {
id: dismissButtonTextMetrics id: dismissButtonTextMetrics
font: loginErrorMessage.font font: loginErrorMessage.font
@ -550,15 +569,14 @@ Item {
} }
HifiControlsUit.Button { HifiControlsUit.Button {
id: dismissButton id: dismissButton
width: dismissButtonTextMetrics.width width: loginButton.width
height: d.minHeightButton height: d.minHeightButton
anchors { anchors {
bottom: parent.bottom top: signUpText.bottom
right: parent.right topMargin: hifi.dimensions.contentSpacing.y
margins: 3 * hifi.dimensions.contentSpacing.y left: loginButton.left
} }
color: hifi.buttons.noneBorderlessWhite text: qsTr("Use without account, log in anonymously")
text: qsTr("No thanks, take me in-world! >")
fontCapitalization: Font.MixedCase fontCapitalization: Font.MixedCase
fontFamily: linkAccountBody.fontFamily fontFamily: linkAccountBody.fontFamily
fontSize: linkAccountBody.fontSize fontSize: linkAccountBody.fontSize
@ -576,6 +594,7 @@ Item {
} }
} }
} }
}
Connections { Connections {
target: loginDialog target: loginDialog

View file

@ -603,8 +603,8 @@ var toolBar = (function () {
Script.setTimeout(dimensionsCheckFunction, DIMENSIONS_CHECK_INTERVAL); Script.setTimeout(dimensionsCheckFunction, DIMENSIONS_CHECK_INTERVAL);
} }
// Make sure the model entity is loaded before we try to figure out // Make sure the model entity is loaded before we try to figure out
// its dimensions. // its dimensions. We need to give ample time to load the entity.
var MAX_LOADED_CHECKS = 10; var MAX_LOADED_CHECKS = 100; // 100 * 100ms = 10 seconds.
var LOADED_CHECK_INTERVAL = 100; var LOADED_CHECK_INTERVAL = 100;
var isLoadedCheckCount = 0; var isLoadedCheckCount = 0;
var entityIsLoadedCheck = function() { var entityIsLoadedCheck = function() {
@ -612,11 +612,19 @@ var toolBar = (function () {
if (isLoadedCheckCount === MAX_LOADED_CHECKS || Entities.isLoaded(entityID)) { if (isLoadedCheckCount === MAX_LOADED_CHECKS || Entities.isLoaded(entityID)) {
var naturalDimensions = Entities.getEntityProperties(entityID, "naturalDimensions").naturalDimensions; var naturalDimensions = Entities.getEntityProperties(entityID, "naturalDimensions").naturalDimensions;
if (isLoadedCheckCount === MAX_LOADED_CHECKS) {
console.log("Model entity failed to load in time: " + (MAX_LOADED_CHECKS * LOADED_CHECK_INTERVAL) + " ... setting dimensions to: " + JSON.stringify(naturalDimensions))
}
Entities.editEntity(entityID, { Entities.editEntity(entityID, {
visible: true, visible: true,
dimensions: naturalDimensions dimensions: naturalDimensions
}) })
dimensionsCheckCallback(); dimensionsCheckCallback();
// We want to update the selection manager again since the script has moved on without us.
selectionManager.clearSelections(this);
entityListTool.sendUpdate();
selectionManager.setSelections([entityID], this);
return; return;
} }
Script.setTimeout(entityIsLoadedCheck, LOADED_CHECK_INTERVAL); Script.setTimeout(entityIsLoadedCheck, LOADED_CHECK_INTERVAL);