mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 11:42:51 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into tablet-ui
This commit is contained in:
commit
cc5fe05268
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.
|
// Literal 50 is overwritten by settings from previous session, and sysToolbar.x comes from settings when not constrained.
|
||||||
x: sysToolbar.x
|
x: sysToolbar.x
|
||||||
y: 50
|
y: 50
|
||||||
shown: false
|
shown: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings {
|
Settings {
|
||||||
|
|
|
@ -49,7 +49,6 @@ Window {
|
||||||
id: content
|
id: content
|
||||||
implicitHeight: horizontal ? row.height : column.height
|
implicitHeight: horizontal ? row.height : column.height
|
||||||
implicitWidth: horizontal ? row.width : column.width
|
implicitWidth: horizontal ? row.width : column.width
|
||||||
property bool wasVisibleBeforeBeingPinned: false
|
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: row
|
id: row
|
||||||
|
@ -62,18 +61,6 @@ Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
Component { id: toolbarButtonBuilder; ToolbarButton { } }
|
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);
|
buttons.push(result);
|
||||||
|
|
||||||
result.opacity = 1;
|
result.opacity = 1;
|
||||||
updatePinned();
|
|
||||||
|
|
||||||
sortButtons();
|
sortButtons();
|
||||||
|
|
||||||
|
shown = true;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,24 +137,12 @@ Window {
|
||||||
console.warn("Tried to remove non-existent button " + name);
|
console.warn("Tried to remove non-existent button " + name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
buttons[index].destroy();
|
buttons[index].destroy();
|
||||||
buttons.splice(index, 1);
|
buttons.splice(index, 1);
|
||||||
updatePinned();
|
|
||||||
|
|
||||||
if (buttons.length === 0) {
|
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