mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 16:41:02 +02:00
Fix for toolbar visibility after snapshots.
This commit is contained in:
parent
e4076e6244
commit
5963c6ddc3
1 changed files with 7 additions and 14 deletions
|
@ -25,7 +25,7 @@ Window {
|
||||||
property real buttonSize: 50;
|
property real buttonSize: 50;
|
||||||
property var buttons: []
|
property var buttons: []
|
||||||
property var container: horizontal ? row : column
|
property var container: horizontal ? row : column
|
||||||
|
|
||||||
Settings {
|
Settings {
|
||||||
category: "toolbar/" + window.objectName
|
category: "toolbar/" + window.objectName
|
||||||
property alias x: window.x
|
property alias x: window.x
|
||||||
|
@ -49,6 +49,7 @@ 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
|
||||||
|
@ -65,19 +66,11 @@ Window {
|
||||||
Connections {
|
Connections {
|
||||||
target: desktop
|
target: desktop
|
||||||
onPinnedChanged: {
|
onPinnedChanged: {
|
||||||
if (!window.pinned) {
|
if (desktop.pinned) {
|
||||||
return;
|
content.wasVisibleBeforeBeingPinned = window.visible;
|
||||||
}
|
window.visible = false;
|
||||||
var newPinned = desktop.pinned;
|
} else {
|
||||||
for (var i in buttons) {
|
window.visible = content.wasVisibleBeforeBeingPinned;
|
||||||
var child = buttons[i];
|
|
||||||
if (desktop.pinned) {
|
|
||||||
if (!child.pinned) {
|
|
||||||
child.visible = false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
child.visible = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue