From 6b4788c3ea3e74bab71e465456b815f3b8a279b4 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 27 Feb 2016 03:39:51 +0100 Subject: [PATCH] textview: Support borders in text node --- gtk/gtktextview.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index d36570c4e4..e63b661d1d 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -4795,11 +4795,16 @@ text_window_set_padding (GtkTextView *text_view, GtkStyleContext *context) { GtkTextViewPrivate *priv; - GtkBorder padding; + GtkBorder padding, border; priv = text_view->priv; gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &padding); + gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &border); + padding.left += border.left; + padding.right += border.right; + padding.top += border.top; + padding.bottom += border.bottom; if (padding.left != priv->left_padding || padding.right != priv->right_padding || @@ -5864,6 +5869,10 @@ draw_text (cairo_t *cr, -priv->xoffset, -priv->yoffset - priv->top_border, MAX (SCREEN_WIDTH (text_view), priv->width), MAX (SCREEN_HEIGHT (text_view), priv->height)); + gtk_render_frame (context, cr, + -priv->xoffset, -priv->yoffset - priv->top_border, + MAX (SCREEN_WIDTH (text_view), priv->width), + MAX (SCREEN_HEIGHT (text_view), priv->height)); gtk_style_context_restore (context); if (GTK_TEXT_VIEW_GET_CLASS (text_view)->draw_layer != NULL)