[libdazzle] dock-bin: handle invisible edges



commit bfd41a11dcbbd284aff69727d53d7ae42b109214
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jul 24 17:58:14 2017 -0700

    dock-bin: handle invisible edges

 src/panel/dzl-dock-bin.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/panel/dzl-dock-bin.c b/src/panel/dzl-dock-bin.c
index 3145bbd..e1b47c7 100644
--- a/src/panel/dzl-dock-bin.c
+++ b/src/panel/dzl-dock-bin.c
@@ -271,6 +271,17 @@ set_visible (DzlDockBin          *self,
 
       if (visible != dzl_dock_revealer_get_reveal_child (DZL_DOCK_REVEALER (widget)))
         {
+
+          /* If the widget isn't currently visible, first make it visible but keep
+           * the reveal-child set as FALSE. That allows us to animate in from a
+           * hiddent initial state.
+           */
+          if (visible && !gtk_widget_get_visible (widget))
+            {
+              dzl_dock_revealer_set_reveal_child (DZL_DOCK_REVEALER (widget), FALSE);
+              gtk_widget_show (child->widget);
+            }
+
           /* Only stash state if there is not an animation in progress.
            * Otherwise we stomp on our previous state.
            */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]