[gtk+] stylecontext: Don't use bg image in gtk_style_context_set_background()



commit 16677bb85ad78ac57776a679abaa69e3d1fc22b9
Author: Benjamin Otte <otte redhat com>
Date:   Fri Oct 26 23:33:40 2012 +0200

    stylecontext: Don't use bg image in gtk_style_context_set_background()
    
    Old code tried to use the "background-image" proeprty for setting the
    default image background. While this used to work in the early days of
    GTK3, today it is grossly misleading as the backgronud image may be
    resized, repositioned and semi-translucent which causes very weird
    artifacts when rendering.
    
    So we use the background-color only instead.

 gtk/gtkstylecontext.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index a6b7369..a139d39 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -3264,22 +3264,12 @@ gtk_style_context_set_background (GtkStyleContext *context,
                                   GdkWindow       *window)
 {
   GtkStateFlags state;
-  cairo_pattern_t *pattern;
   GdkRGBA *color;
 
   g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
   g_return_if_fail (GDK_IS_WINDOW (window));
 
   state = gtk_style_context_get_state (context);
-  gtk_style_context_get (context, state,
-                         "background-image", &pattern,
-                         NULL);
-  if (pattern)
-    {
-      gdk_window_set_background_pattern (window, pattern);
-      cairo_pattern_destroy (pattern);
-      return;
-    }
 
   gtk_style_context_get (context, state,
                          "background-color", &color,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]