From 3812dbc1d5731fd82075f8da6ce298fb6880a5cb Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 24 Mar 2011 16:13:07 +0000 Subject: [PATCH] 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 --- panels/user-accounts/um-crop-area.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panels/user-accounts/um-crop-area.c b/panels/user-accounts/um-crop-area.c index bce39c425..94ddd0d99 100644 --- a/panels/user-accounts/um-crop-area.c +++ b/panels/user-accounts/um-crop-area.c @@ -115,9 +115,9 @@ update_pixbufs (UmCropArea *area) allocation.width, allocation.height); gtk_style_context_get_background_color (context, gtk_style_context_get_state (context), &color); - pixel = (((gint)(color.red * 255)) << 16) | - (((gint)(color.green * 255)) << 8) | - ((gint)(color.blue * 255)); + pixel = (((gint)(color.red * 1.0)) << 16) | + (((gint)(color.green * 1.0)) << 8) | + ((gint)(color.blue * 1.0)); gdk_pixbuf_fill (area->priv->pixbuf, pixel); width = gdk_pixbuf_get_width (area->priv->browse_pixbuf);