[libhandy/wip/haecker-felix/flap-widget: 114/138] Add missing overlay setter




commit ad022bcd78f2790600837b1ad48e6db66d8830e7
Author: Felix Häcker <haeckerfelix gnome org>
Date:   Mon Jul 27 17:16:51 2020 +0200

    Add missing overlay setter

 src/hdy-flap.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
---
diff --git a/src/hdy-flap.c b/src/hdy-flap.c
index dc3d9b12..3682e834 100644
--- a/src/hdy-flap.c
+++ b/src/hdy-flap.c
@@ -683,6 +683,28 @@ hdy_flap_get_overlay (HdyFlap *self)
   return self->overlay;
 }
 
+/**
+ * hdy_flap_set_overlay:
+ * @self: a #HdyFlap
+ * @overlay: Overlay flap
+ *
+ * Since: 1.0
+ */
+void
+hdy_flap_set_overlay (HdyFlap  *self,
+                      gboolean  overlay)
+{
+  g_return_if_fail (HDY_IS_FLAP (self));
+  overlay = !!overlay;
+
+  if (self->reveal_flap == overlay)
+    return;
+
+  self->overlay = overlay;
+
+  g_object_notify_by_pspec (G_OBJECT (self), props[PROP_OVERLAY]);
+}
+
 /**
  * hdy_flap_get_overlay_duration:
  * @self: a #HdyFlap


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