[gtk+/wip/chergert/quartz-frame-clock: 214/228] textview: share GtkStyleContext with GtkPixelCache
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/chergert/quartz-frame-clock: 214/228] textview: share GtkStyleContext with GtkPixelCache
- Date: Fri, 25 Sep 2015 09:43:27 +0000 (UTC)
commit f6d96397b7525a26f9a31a0c1449128d10f45c9b
Author: Christian Hergert <christian hergert me>
Date: Tue Sep 8 14:50:12 2015 -0700
textview: share GtkStyleContext with GtkPixelCache
This allows the pixel cache to know about the background of the textview and
choose an appropriate cairo_content_t for optional fast path.
gtk/gtktextview.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 299b3ce..54c60d3 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -1652,7 +1652,9 @@ gtk_text_view_init (GtkTextView *text_view)
gtk_widget_set_can_focus (widget, TRUE);
priv->pixel_cache = _gtk_pixel_cache_new ();
- _gtk_pixel_cache_set_content (priv->pixel_cache, CAIRO_CONTENT_COLOR);
+
+ style_context = gtk_widget_get_style_context (GTK_WIDGET (text_view));
+ _gtk_pixel_cache_set_style_context (priv->pixel_cache, style_context);
style_context = gtk_widget_get_style_context (GTK_WIDGET (text_view));
_gtk_pixel_cache_set_style_context (priv->pixel_cache, style_context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]