diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2012-03-23 01:16:33 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2012-03-27 21:15:35 +0800 |
commit | 8df3bd2167cc3b0944f07c2843cdce26f81eb7ba (patch) | |
tree | b0e74a3611c2a0ebb644367f4e1a58680f0ea087 | |
parent | 768f6759733762149f35618f6dfb166d56c9cc6e (diff) | |
download | gsoc2013-empathy-8df3bd2167cc3b0944f07c2843cdce26f81eb7ba.tar gsoc2013-empathy-8df3bd2167cc3b0944f07c2843cdce26f81eb7ba.tar.gz gsoc2013-empathy-8df3bd2167cc3b0944f07c2843cdce26f81eb7ba.tar.bz2 gsoc2013-empathy-8df3bd2167cc3b0944f07c2843cdce26f81eb7ba.tar.lz gsoc2013-empathy-8df3bd2167cc3b0944f07c2843cdce26f81eb7ba.tar.xz gsoc2013-empathy-8df3bd2167cc3b0944f07c2843cdce26f81eb7ba.tar.zst gsoc2013-empathy-8df3bd2167cc3b0944f07c2843cdce26f81eb7ba.zip |
rounded-rectangle: cairo_set_source_rgba() takes [0..1] arguments
And not [0..255] integers.
https://bugzilla.gnome.org/show_bug.cgi?id=672561
-rw-r--r-- | src/empathy-rounded-rectangle.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/empathy-rounded-rectangle.c b/src/empathy-rounded-rectangle.c index 7b8951f80..1de5eb442 100644 --- a/src/empathy-rounded-rectangle.c +++ b/src/empathy-rounded-rectangle.c @@ -45,7 +45,7 @@ draw_cb (ClutterCairoTexture *canvas, EmpathyRoundedRectangle *self = EMPATHY_ROUNDED_RECTANGLE (canvas); guint width, height; guint border_width; - guint tmp_alpha; + gdouble tmp_alpha; gdouble radius; width = self->priv->width; @@ -55,14 +55,13 @@ draw_cb (ClutterCairoTexture *canvas, /* compute the composited opacity of the actor taking into * account the opacity of the color set by the user */ - tmp_alpha = clutter_actor_get_paint_opacity (CLUTTER_ACTOR (self)) - * self->priv->border_color.alpha - / 255; + tmp_alpha = (clutter_actor_get_paint_opacity (CLUTTER_ACTOR (self)) + * self->priv->border_color.alpha) / 255.; cairo_set_source_rgba (cr, - self->priv->border_color.red, - self->priv->border_color.green, - self->priv->border_color.blue, + self->priv->border_color.red / 255., + self->priv->border_color.green / 255., + self->priv->border_color.blue / 255., tmp_alpha); cairo_set_line_width (cr, border_width); |