[mutter] tile-preview: Use gdk_cairo_set_source_rgba()



commit a2cb38b382d044089b0f8eab175304feb7e3991c
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed May 18 19:36:56 2011 +0200

    tile-preview: Use gdk_cairo_set_source_rgba()
    
    gdk_cairo_set_source_rgba() is a convenience function which was
    added to GTK+-3.0 after the port to GtkStyleContext, so we ended
    up using cairo_set_source_rgba() instead. Save a couple of lines ...

 src/ui/tile-preview.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/src/ui/tile-preview.c b/src/ui/tile-preview.c
index f955fe8..01cd9c9 100644
--- a/src/ui/tile-preview.c
+++ b/src/ui/tile-preview.c
@@ -55,11 +55,7 @@ meta_tile_preview_draw (GtkWidget *widget,
   if (preview->has_alpha)
     {
       /* Fill the preview area with a transparent color */
-      cairo_set_source_rgba (cr,
-                             preview->preview_color->red,
-                             preview->preview_color->green,
-                             preview->preview_color->blue,
-                             preview->preview_color->alpha);
+      gdk_cairo_set_source_rgba (cr, preview->preview_color);
 
       cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
       cairo_paint (cr);



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