mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 09:33:49 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into menuGroups
This commit is contained in:
commit
3e05d95478
3 changed files with 21 additions and 3 deletions
|
@ -13,6 +13,12 @@
|
|||
|
||||
SpatiallyNestableWeakPointer AssignmentParentFinder::find(QUuid parentID, bool& success) const {
|
||||
SpatiallyNestableWeakPointer parent;
|
||||
|
||||
if (parentID.isNull()) {
|
||||
success = true;
|
||||
return parent;
|
||||
}
|
||||
|
||||
// search entities
|
||||
parent = _tree->findEntityByEntityItemID(parentID);
|
||||
if (parent.expired()) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!-- Copyright 2015 High Fidelity, Inc. -->
|
||||
<!-- Copyright 2015 High Fidelity, Inc. -->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
|
@ -14,7 +14,7 @@
|
|||
|
||||
body {
|
||||
background: white;
|
||||
width: 839px;
|
||||
width: 100%;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
|
@ -181,7 +181,7 @@
|
|||
function overrideBodyWidth() {
|
||||
document.body.style.width = "100%";
|
||||
<!-- Force reset layout after body resized-->
|
||||
container.style.width = "0";
|
||||
<!-- container.style.width = "0"; -->
|
||||
}
|
||||
//]]></script>
|
||||
|
||||
|
|
|
@ -51,6 +51,16 @@ Hifi.VrMenu {
|
|||
VrMenuView {
|
||||
property int menuDepth: root.models.length - 1
|
||||
model: root.models[menuDepth]
|
||||
|
||||
function fit(position, size, maxposition) {
|
||||
var padding = 8;
|
||||
if (position < padding) {
|
||||
position = padding;
|
||||
} else if (position + size + padding > maxposition) {
|
||||
position = maxposition - (size + padding);
|
||||
}
|
||||
return position;
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (menuDepth === 0) {
|
||||
|
@ -61,6 +71,8 @@ Hifi.VrMenu {
|
|||
x = lastColumn.x + 64;
|
||||
y = lastMousePosition.y - height / 2;
|
||||
}
|
||||
x = fit(x, width, parent.width);
|
||||
y = fit(y, height, parent.height);
|
||||
}
|
||||
|
||||
onSelected: {
|
||||
|
|
Loading…
Reference in a new issue