[libhandy/wip/haecker-felix/flap-widget: 87/98] implement few missing parts
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy/wip/haecker-felix/flap-widget: 87/98] implement few missing parts
- Date: Mon, 3 Aug 2020 16:27:56 +0000 (UTC)
commit 092fc4afdfffe5da9d60509ce40c1f966136d8b3
Author: Felix Häcker <haeckerfelix gnome org>
Date: Tue Jul 28 20:39:06 2020 +0200
implement few missing parts
src/hdy-flap.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/src/hdy-flap.c b/src/hdy-flap.c
index fd6346da..2f8bbb42 100644
--- a/src/hdy-flap.c
+++ b/src/hdy-flap.c
@@ -688,7 +688,6 @@ hdy_flap_class_init (HdyFlapClass *klass)
static void
hdy_flap_init (HdyFlap *self)
{
- gtk_widget_set_has_window (GTK_WIDGET (self), FALSE);
self->flap_position = GTK_PACK_START;
self->orientation = GTK_ORIENTATION_HORIZONTAL;
self->overlay_duration = 250;
@@ -742,8 +741,14 @@ hdy_flap_set_flap (HdyFlap *self,
if (self->flap == flap)
return;
+ if (self->flap)
+ gtk_widget_unparent(self->flap);
+
self->flap = flap;
+ if (!self->flap)
+ gtk_widget_set_parent (GTK_WIDGET (self), self->flap);
+
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_FLAP]);
}
@@ -781,6 +786,12 @@ hdy_flap_set_flap_mode (HdyFlap *self,
self->flap_mode = flap_mode;
+ if (self->flap_mode == HDY_FLAP_MODE_OVERLAY)
+ set_overlay(self, TRUE);
+
+ if (self->flap_mode == HDY_FLAP_MODE_NON_OVERLAY)
+ set_overlay(self, FALSE);
+
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_FLAP_MODE]);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]