mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 07:12:40 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into ambient
This commit is contained in:
commit
e6d30fbb2f
2 changed files with 5 additions and 29 deletions
|
@ -55,7 +55,7 @@ OriginalDesktop.Desktop {
|
|||
// Literal 50 is overwritten by settings from previous session, and sysToolbar.x comes from settings when not constrained.
|
||||
x: sysToolbar.x
|
||||
y: 50
|
||||
shown: false
|
||||
shown: true
|
||||
}
|
||||
|
||||
Settings {
|
||||
|
|
|
@ -49,7 +49,6 @@ Window {
|
|||
id: content
|
||||
implicitHeight: horizontal ? row.height : column.height
|
||||
implicitWidth: horizontal ? row.width : column.width
|
||||
property bool wasVisibleBeforeBeingPinned: false
|
||||
|
||||
Row {
|
||||
id: row
|
||||
|
@ -62,18 +61,6 @@ Window {
|
|||
}
|
||||
|
||||
Component { id: toolbarButtonBuilder; ToolbarButton { } }
|
||||
|
||||
Connections {
|
||||
target: desktop
|
||||
onPinnedChanged: {
|
||||
if (desktop.pinned) {
|
||||
content.wasVisibleBeforeBeingPinned = window.visible;
|
||||
window.visible = false;
|
||||
} else {
|
||||
window.visible = content.wasVisibleBeforeBeingPinned;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -136,10 +123,11 @@ Window {
|
|||
buttons.push(result);
|
||||
|
||||
result.opacity = 1;
|
||||
updatePinned();
|
||||
|
||||
sortButtons();
|
||||
|
||||
shown = true;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -149,24 +137,12 @@ Window {
|
|||
console.warn("Tried to remove non-existent button " + name);
|
||||
return;
|
||||
}
|
||||
|
||||
buttons[index].destroy();
|
||||
buttons.splice(index, 1);
|
||||
updatePinned();
|
||||
|
||||
if (buttons.length === 0) {
|
||||
fadeOut(function () {});
|
||||
shown = false;
|
||||
}
|
||||
}
|
||||
|
||||
function updatePinned() {
|
||||
var newPinned = false;
|
||||
for (var i in buttons) {
|
||||
var child = buttons[i];
|
||||
if (child.pinned) {
|
||||
newPinned = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
pinned = newPinned;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue