summaryrefslogtreecommitdiff
path: root/gtk/gtktextlayout.c
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2011-02-14 15:27:42 +0900
committerMatthias Clasen <mclasen@redhat.com>2011-05-06 17:05:34 -0400
commitcefb95011000ad12d9f2cc71c6b9175e1d9746dd (patch)
treec867549632261393fa5e41aee61e127d3c09ea82 /gtk/gtktextlayout.c
parent2b2d7aa30509e1b74f00e2b1809d7a646455dd3b (diff)
downloadgtk+-cefb95011000ad12d9f2cc71c6b9175e1d9746dd.tar.gz
Added internal GdkRGBA support for GtkTextTag::paragraph-background-rgba
Added the remaining implementation bits for rendering paragraph backgrounds with rgba values and updated the test case.
Diffstat (limited to 'gtk/gtktextlayout.c')
-rw-r--r--gtk/gtktextlayout.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c
index f19ab618d2..7d48a3d059 100644
--- a/gtk/gtktextlayout.c
+++ b/gtk/gtktextlayout.c
@@ -1408,7 +1408,12 @@ set_para_values (GtkTextLayout *layout,
if (style->pg_bg_color)
display->pg_bg_color = gdk_color_copy (style->pg_bg_color);
else
- display->pg_bg_color = NULL;
+ display->pg_bg_color = NULL;
+
+ if (style->pg_bg_rgba)
+ display->pg_bg_rgba = gdk_rgba_copy (style->pg_bg_rgba);
+ else
+ display->pg_bg_rgba = NULL;
}
static PangoAttribute *
@@ -2533,6 +2538,9 @@ gtk_text_layout_free_line_display (GtkTextLayout *layout,
if (display->pg_bg_color)
gdk_color_free (display->pg_bg_color);
+ if (display->pg_bg_rgba)
+ gdk_rgba_free (display->pg_bg_rgba);
+
g_free (display);
}
}