aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorXan Lopez <xan@gnome.org>2010-05-23 21:13:51 +0800
committerXan Lopez <xan@gnome.org>2010-05-23 21:13:51 +0800
commitc04180dc6d7053c39b144d7953d9e4314277a81e (patch)
treea27130033fe1328a575236076128712784dc2c45 /embed
parent507c3d33ab6323a398e7e3f3054788d1fc23fe37 (diff)
downloadgsoc2013-epiphany-c04180dc6d7053c39b144d7953d9e4314277a81e.tar
gsoc2013-epiphany-c04180dc6d7053c39b144d7953d9e4314277a81e.tar.gz
gsoc2013-epiphany-c04180dc6d7053c39b144d7953d9e4314277a81e.tar.bz2
gsoc2013-epiphany-c04180dc6d7053c39b144d7953d9e4314277a81e.tar.lz
gsoc2013-epiphany-c04180dc6d7053c39b144d7953d9e4314277a81e.tar.xz
gsoc2013-epiphany-c04180dc6d7053c39b144d7953d9e4314277a81e.tar.zst
gsoc2013-epiphany-c04180dc6d7053c39b144d7953d9e4314277a81e.zip
ephy-web-view: add a bit of padding to the statusbar
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-web-view.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 1072bdb80..9f2fa34c1 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1412,8 +1412,8 @@ ephy_web_view_expose_event (GtkWidget *widget, GdkEventExpose *event)
priv = EPHY_WEB_VIEW (widget)->priv;
if (priv->text && priv->text[0] != '\0') {
- gint x, y, width, height;
- guint border_width;
+ gint width, height;
+ guint border_width, statusbar_border_width;
PangoLayout *layout;
GtkAllocation allocation;
GdkWindow *window;
@@ -1428,26 +1428,31 @@ ephy_web_view_expose_event (GtkWidget *widget, GdkEventExpose *event)
pango_layout_get_pixel_size (layout, &width, &height);
border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
- x = border_width;
- y = allocation.height - height - border_width;
window = gtk_widget_get_window (widget);
style = gtk_widget_get_style (widget);
+
+ statusbar_border_width = 4; /* FIXME: what should we use here? */
+
+ priv->text_rectangle.x = border_width;
+ priv->text_rectangle.y = allocation.height - height - border_width - (statusbar_border_width * 2);
+ priv->text_rectangle.width = width + (statusbar_border_width * 2);
+ priv->text_rectangle.height = height + (statusbar_border_width * 2);
+
gtk_paint_box (style, window,
GTK_STATE_NORMAL, GTK_SHADOW_IN,
NULL, widget, NULL,
- x, allocation.height - height - border_width,
- width, height);
-
- priv->text_rectangle.x = x;
- priv->text_rectangle.y = allocation.height - height - border_width;
- priv->text_rectangle.width = width;
- priv->text_rectangle.height = height;
+ priv->text_rectangle.x,
+ priv->text_rectangle.y,
+ priv->text_rectangle.width,
+ priv->text_rectangle.height);
gtk_paint_layout (style, window,
GTK_STATE_NORMAL, FALSE,
NULL, widget, NULL,
- x, y, layout);
+ priv->text_rectangle.x + statusbar_border_width,
+ priv->text_rectangle.y + statusbar_border_width,
+ layout);
g_object_unref (layout);
}