changeset 11479:5298197df5bd

[gaim-migrate @ 13721] Hopefully this fixes the color issues several devs are seeing. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Fri, 09 Sep 2005 18:23:52 +0000
parents 67abb500f600
children e9251afae7b8
files src/gtkconv.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Fri Sep 09 17:35:43 2005 +0000
+++ b/src/gtkconv.c	Fri Sep 09 18:23:52 2005 +0000
@@ -126,13 +126,13 @@
 static GdkColor *get_nick_color(GaimGtkConversation *gtkconv, const char *name) {
 	static GdkColor col;
 	GtkStyle *style = gtk_widget_get_style(gtkconv->imhtml);
-	float scale = ((1-(LUMINANCE(style->base[GTK_STATE_NORMAL]) / LUMINANCE(style->white))) *
-			   (LUMINANCE(style->white)/MAX(MAX(col.red, col.blue), col.green)));
 
 	col = nick_colors[g_str_hash(name) % NUM_NICK_COLORS];
 
 	/* The colors are chosen to look fine on white; we should never have to darken */
 	if (scale > 1) {
+		float scale = ((1-(LUMINANCE(style->base[GTK_STATE_NORMAL]) / LUMINANCE(style->white))) *
+			       (LUMINANCE(style->white)/MAX(MAX(col.red, col.blue), col.green)));
 		col.red   *= scale;
 		col.green *= scale;
 		col.blue  *= scale;