Move show panel animation to a signal

Should ideally have hide animation in a signal too, but this doesn't seem to be
viable as it gnome-shell tries really hard to hide the panel when focusing a
fullscreen window.

Ie. if we disconnect both signals, show the panel while animating out
gnome-shell will just hide it again.
This commit is contained in:
Tor Hedin Brønner
2017-09-21 02:21:21 +02:00
parent e48943cc8e
commit f215d61ba7
+11 -5
View File
@@ -19,6 +19,16 @@ stack_margin = 75
statusbar_height = Main.layoutManager.panelBox.height;
Main.layoutManager.panelBox.connect('show', () => {
Tweener.addTween(Main.layoutManager.panelBox, {
y: 0,
time: 0.25,
onOverWrite: () => {
Main.layoutManager.panelBox.y = 0;
}
});
})
workspaces = []
for (let i=0; i < global.screen.n_workspaces; i++) {
workspaces[i] = []
@@ -137,11 +147,7 @@ ensure_viewport = (meta_window, force) => {
// Hack to ensure the statusbar is visible while there's a fullscreen
// windows in the workspace.
if (!Main.layoutManager.panelBox.visible) {
Main.layoutManager.panelBox.visible = true;
Tweener.addTween(Main.layoutManager.panelBox, {
y: 0,
time: 0.25
});
Main.layoutManager.panelBox.show();
}
let x = frame.x;