From bfb72ff6e28aaa22f62dc3364cc560f4215063be Mon Sep 17 00:00:00 2001 From: Alexandre Mazari Date: Tue, 19 Apr 2011 13:00:00 +0200 Subject: Slide out the status overlay when the mouse pointer goes close by. This introduces a GeditOverlayChild subclass, listening to parent overlay mouse events to define the escaping policy. The distance from which the widget "escapes" the mouse pointer can be set at construction time. https://bugzilla.gnome.org/show_bug.cgi?id=643909 --- embed/ephy-embed.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'embed/ephy-embed.c') diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c index 130abdc71..4a3739faf 100644 --- a/embed/ephy-embed.c +++ b/embed/ephy-embed.c @@ -43,6 +43,7 @@ #include "ephy-string.h" #include "ephy-web-view.h" #include "gedit-overlay.h" +#include "ephy-overlay-escaping-child.h" #include #include @@ -495,6 +496,7 @@ ephy_embed_constructed (GObject *object) WebKitWebWindowFeatures *window_features; WebKitWebInspector *inspector; GtkWidget *overlay; + EphyOverlayEscapingChild *escaping_child; GtkWidget *frame; GtkCssProvider *provider; GtkStyleContext *context; @@ -525,7 +527,10 @@ ephy_embed_constructed (GObject *object) gtk_widget_show (frame); gtk_container_add (GTK_CONTAINER (frame), priv->statusbar_label); - gedit_overlay_add (GEDIT_OVERLAY (overlay), frame, GEDIT_OVERLAY_CHILD_POSITION_SOUTH_WEST, 0); + escaping_child = ephy_overlay_escaping_child_new (frame); + gedit_overlay_add (GEDIT_OVERLAY (overlay), + GTK_WIDGET (escaping_child), + GEDIT_OVERLAY_CHILD_POSITION_SOUTH_WEST, 0); paned = GTK_WIDGET (embed->priv->paned); -- cgit v1.2.3