user-accounts: Fix blue-ish bg in crop dialogue

The conversion to GtkStyleContext means we now use GdkRGBA,
so we need to scale the colours between 0.0 and 1.0, not 0 and 255.

https://bugzilla.gnome.org/show_bug.cgi?id=645712
This commit is contained in:
Bastien Nocera 2011-03-24 16:13:07 +00:00
parent 5b5347b5b2
commit 3812dbc1d5

View file

@ -115,9 +115,9 @@ update_pixbufs (UmCropArea *area)
allocation.width, allocation.height); allocation.width, allocation.height);
gtk_style_context_get_background_color (context, gtk_style_context_get_state (context), &color); gtk_style_context_get_background_color (context, gtk_style_context_get_state (context), &color);
pixel = (((gint)(color.red * 255)) << 16) | pixel = (((gint)(color.red * 1.0)) << 16) |
(((gint)(color.green * 255)) << 8) | (((gint)(color.green * 1.0)) << 8) |
((gint)(color.blue * 255)); ((gint)(color.blue * 1.0));
gdk_pixbuf_fill (area->priv->pixbuf, pixel); gdk_pixbuf_fill (area->priv->pixbuf, pixel);
width = gdk_pixbuf_get_width (area->priv->browse_pixbuf); width = gdk_pixbuf_get_width (area->priv->browse_pixbuf);