[gnumeric] About: fix colouring problems.



commit 51687f2e2b10c2d89f36268faa47476afb8bd038
Author: Morten Welinder <terra gnome org>
Date:   Wed Aug 10 14:55:37 2011 -0400

    About: fix colouring problems.

 src/dialogs/ChangeLog      |    6 ++++++
 src/dialogs/dialog-about.c |    5 +++--
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 92be0e4..311f72b 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,9 @@
+2011-08-10  Morten Welinder  <terra gnome org>
+
+	* dialog-about.c (blend_colors): Blend alpha too.
+	(set_fade): Set the right background colour; actually use the
+	blended colour.
+
 2011-08-09  Jean Brefort  <jean brefort normalesup org>
 
 	* dialog-zoom.ui: fixed the GtkBox orientation.
diff --git a/src/dialogs/dialog-about.c b/src/dialogs/dialog-about.c
index d9d47c9..4160fc5 100644
--- a/src/dialogs/dialog-about.c
+++ b/src/dialogs/dialog-about.c
@@ -202,6 +202,7 @@ blend_colors (const GdkRGBA *start, const GdkRGBA *end, double f)
 	res.red   = start->red   * (1 - f) + end->red   * f;
 	res.green = start->green * (1 - f) + end->green * f;
 	res.blue  = start->blue  * (1 - f) + end->blue  * f;
+	res.alpha = start->alpha * (1 - f) + end->alpha * f;
 	return res;
 }
 
@@ -215,8 +216,8 @@ set_fade (AboutRenderer *r, AboutState *state, double f)
 	PangoAttribute *attr;
 
 	gtk_style_context_get_color (ctxt, GTK_STATE_NORMAL, &fg);
-	gtk_style_context_get_background_color (ctxt, GTK_STATE_NORMAL, &fg);
-	blend_colors (&bg, &fg, f);
+	gtk_style_context_get_background_color (ctxt, GTK_STATE_NORMAL, &bg);
+	col = blend_colors (&bg, &fg, f);
 	attr = pango_attr_foreground_new
 		(col.red * 65535., col.green * 65535., col.blue * 65535.);
 	pango_attr_list_change (attrlist, attr);



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