Re: [Nautilus-list] Text color in sidebar
- From: Darin Adler <darin bentspoon com>
- To: Alex Larsson <alexl redhat com>
- Cc: Havoc Pennington <hp redhat com>, Nautilus <nautilus-list lists eazel com>
- Subject: Re: [Nautilus-list] Text color in sidebar
- Date: Sun, 16 Sep 2001 16:32:27 -0700
on 9/16/01 2:43 PM, Alex Larsson at alexl redhat com wrote:
> I just took a look at the eel_background_is_dark() code. I did not compile
> this, but i believe this patch should fix the problem:
>
> Index: eel-gdk-pixbuf-extensions.c
> ===================================================================
> RCS file: /cvs/gnome/eel/eel/eel-gdk-pixbuf-extensions.c,v
> retrieving revision 1.9
> diff -u -p -r1.9 eel-gdk-pixbuf-extensions.c
> --- eel-gdk-pixbuf-extensions.c 2001/08/15 15:59:24 1.9
> +++ eel-gdk-pixbuf-extensions.c 2001/09/16 21:41:22
> @@ -314,9 +314,9 @@ eel_gdk_pixbuf_average_value (GdkPixbuf
> }
> }
>
> - color->red = (red_total * 256) / count;
> - color->green = (green_total * 256) / count;
> - color->blue = (blue_total * 256) / count;
> + color->red = (red_total / count) * 256;
> + color->green = (green_total / count) * 256;
> + color->blue = (blue_total / count) *256;
> }
>
> double
Thanks Alex! Looks great!
I think I have an even nicer fix that keeps the rounding error to a minimum
even with smaller pixbufs. I'll check it in shortly.
-- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]