[metacity] theme: Also support alpha values in blend/shade functions



commit a02e7ae671945a626f3ae4825eff83ad78c33694
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Jul 3 20:06:01 2014 +0200

    theme: Also support alpha values in blend/shade functions
    
    This doesn't appear to be used currently, but fix it while at it ...

 src/ui/theme.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index ecb0920..82a7f3e 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -181,6 +181,7 @@ color_composite (const GdkRGBA *bg,
   color->red = color->red + (fg->red - color->red) * alpha;
   color->green = color->green + (fg->green - color->green) * alpha;
   color->blue = color->blue + (fg->blue - color->blue) * alpha;
+  color->alpha = color->alpha + (fg->alpha - color->alpha) * alpha;
 }
 
 /**
@@ -6313,6 +6314,7 @@ gtk_style_shade (GdkRGBA *a,
   b->red = red;
   b->green = green;
   b->blue = blue;
+  b->alpha = a->alpha;
 }
 
 /**


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