Beispiel #1
0
        public void RemoveOverlayWidget(bool animate = false)
        {
            this.AbortAnimation("ShowOverlayWidget");
            this.AbortAnimation("HideOverlayWidget");
            OverlayWidgetVisible = false;

            mainBox.Show();

            if (overlayWidget != null)
            {
                if (animate)
                {
                    currentOverlayPosition = Allocation.Y;
                    this.Animate(
                        "HideOverlayWidget",
                        HideOverlayWidgetAnimation,
                        finished: (a, b) => {
                        if (overlayWidget != null)
                        {
                            overlayWidget.Unparent();

                            // After we've unparented the widget, we call remove so the A11y system can clean up as well.
                            GLib.Signal.Emit(this, "remove", overlayWidget);
                            overlayWidget = null;
                        }
                    },
                        easing: Easing.SinOut);
                }
                else
                {
                    overlayWidget.Unparent();
                    // After we've unparented the widget, we call remove so the A11y system can clean up as well.
                    GtkWorkarounds.EmitRemoveSignal(this, overlayWidget);

                    overlayWidget = null;
                    QueueResize();
                }
            }

            UpdateDockbarsVisibility();
        }