diff options
author | Xan Lopez <xlopez@igalia.com> | 2011-03-05 05:20:53 +0800 |
---|---|---|
committer | Xan Lopez <xlopez@igalia.com> | 2011-03-05 05:23:23 +0800 |
commit | 73e78a2119169e0586e282ffab7ddb51b705d69a (patch) | |
tree | 8554bfaa4ef9ab676e969fab628ecffb0ca29d77 | |
parent | 5fed4b274d16041d629155c6b246a46917d09fe7 (diff) | |
download | gsoc2013-epiphany-73e78a2119169e0586e282ffab7ddb51b705d69a.tar gsoc2013-epiphany-73e78a2119169e0586e282ffab7ddb51b705d69a.tar.gz gsoc2013-epiphany-73e78a2119169e0586e282ffab7ddb51b705d69a.tar.bz2 gsoc2013-epiphany-73e78a2119169e0586e282ffab7ddb51b705d69a.tar.lz gsoc2013-epiphany-73e78a2119169e0586e282ffab7ddb51b705d69a.tar.xz gsoc2013-epiphany-73e78a2119169e0586e282ffab7ddb51b705d69a.tar.zst gsoc2013-epiphany-73e78a2119169e0586e282ffab7ddb51b705d69a.zip |
ephy-embed: add a border and a little padding to the status frame
Otherwise it blends a bit too effectively into clear backgrounds.
-rw-r--r-- | embed/ephy-embed.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c index f53d6851a..ebd34d163 100644 --- a/embed/ephy-embed.c +++ b/embed/ephy-embed.c @@ -874,6 +874,9 @@ ephy_embed_constructed (GObject *object) WebKitWebInspector *inspector; GtkWidget *overlay; GtkWidget *frame; + GtkCssProvider *provider; + GtkStyleContext *context; + GError *error = NULL; /* Skeleton */ web_view = WEBKIT_WEB_VIEW (ephy_web_view_new ()); @@ -883,7 +886,22 @@ ephy_embed_constructed (GObject *object) /* statusbar is hidden by default */ priv->statusbar_label = gtk_label_new (NULL); frame = gtk_frame_new (NULL); + gtk_widget_set_name (frame, "ephy-status-frame"); + provider = gtk_css_provider_new (); + gtk_css_provider_load_from_data (provider, + "#ephy-status-frame { border-style: solid; border-width: 1; padding: 4; }", + -1, &error); + if (error == NULL) { + context = gtk_widget_get_style_context (frame); + gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER (provider), + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + } else + g_error_free (error); + + g_object_unref (provider); + 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); |