[epiphany] ephy-embed: add a border and a little padding to the status frame
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-embed: add a border and a little padding to the status frame
- Date: Fri, 4 Mar 2011 21:25:27 +0000 (UTC)
commit 73e78a2119169e0586e282ffab7ddb51b705d69a
Author: Xan Lopez <xlopez igalia com>
Date: Fri Mar 4 22:20:53 2011 +0100
ephy-embed: add a border and a little padding to the status frame
Otherwise it blends a bit too effectively into clear backgrounds.
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 f53d685..ebd34d1 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]