panel: Don't completely hide AppMenuButton when invisible

We already set the AppMenuButton to be non-reactive and transparent when
we hide it. Hiding it completely using clutter_actor_hide() will
additionally make it no longer affect layout and thus queue a relayout.

Since we hide the appMenu in the overview and we want to avoid
relayouting the panel when entering and leaving the overview, don't
completely hide the AppMenuButton to avoid queueing this relayout.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1733>
This commit is contained in:
Jonas Dreßler 2021-03-01 10:03:50 +01:00 committed by Marge Bot
parent fb1ab4f20b
commit e6c1db2bc8

View File

@ -222,7 +222,6 @@ var AppMenuButton = GObject.registerClass({
this._visible = true;
this.reactive = true;
this.show();
this.remove_all_transitions();
this.ease({
opacity: 255,
@ -242,7 +241,6 @@ var AppMenuButton = GObject.registerClass({
opacity: 0,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
duration: Overview.ANIMATION_TIME,
onComplete: () => this.hide(),
});
}