mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05:00
Decouple actor opacity from fill opacity in ClutterRectangle (fixes
race when both are set from clutter script also makes it more consistent with the behavior of other actors.) * clutter/clutter-rectangle.c: (clutter_rectangle_set_color): stop setting the opacity of the actor from the specified color. (clutter_rectangle_paint): combine the absolute opacity of the actor with the alpha of the color when painting.
This commit is contained in:
parent
2008a03a6b
commit
ecd5ba2bd2
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
2008-05-20 Øyvind Kolås <pippin@o-hand.com>
|
||||
|
||||
Decouple actor opacity from fill opacity in ClutterRectangle (fixes
|
||||
race when both are set from clutter script also makes it more
|
||||
consistent with the behavior of other actors.)
|
||||
|
||||
* clutter/clutter-rectangle.c: (clutter_rectangle_set_color): stop
|
||||
setting the opacity of the actor from the specified color.
|
||||
(clutter_rectangle_paint): combine the absolute opacity of the actor
|
||||
with the alpha of the color when painting.
|
||||
|
||||
2008-05-20 Ivan Leben <ivan@o-hand.com>
|
||||
|
||||
* clutter/cogl/gles/cogl-texture.c:
|
||||
|
@ -96,7 +96,8 @@ clutter_rectangle_paint (ClutterActor *self)
|
||||
tmp_col.red = priv->border_color.red;
|
||||
tmp_col.green = priv->border_color.green;
|
||||
tmp_col.blue = priv->border_color.blue;
|
||||
tmp_col.alpha = clutter_actor_get_abs_opacity (self);
|
||||
tmp_col.alpha = (clutter_actor_get_abs_opacity (self) *
|
||||
priv->border_color.alpha) / 0xff;
|
||||
|
||||
cogl_color (&tmp_col);
|
||||
|
||||
@ -121,6 +122,8 @@ clutter_rectangle_paint (ClutterActor *self)
|
||||
tmp_col.red = priv->color.red;
|
||||
tmp_col.green = priv->color.green;
|
||||
tmp_col.blue = priv->color.blue;
|
||||
tmp_col.alpha = (clutter_actor_get_abs_opacity (self) *
|
||||
priv->color.alpha) / 0xff;
|
||||
|
||||
cogl_color (&tmp_col);
|
||||
|
||||
@ -134,7 +137,8 @@ clutter_rectangle_paint (ClutterActor *self)
|
||||
tmp_col.red = priv->color.red;
|
||||
tmp_col.green = priv->color.green;
|
||||
tmp_col.blue = priv->color.blue;
|
||||
tmp_col.alpha = clutter_actor_get_abs_opacity (self);
|
||||
tmp_col.alpha = (clutter_actor_get_abs_opacity (self) *
|
||||
priv->color.alpha) / 0xff;
|
||||
|
||||
cogl_color (&tmp_col);
|
||||
|
||||
@ -392,8 +396,6 @@ clutter_rectangle_set_color (ClutterRectangle *rectangle,
|
||||
priv->color.blue = color->blue;
|
||||
priv->color.alpha = color->alpha;
|
||||
|
||||
clutter_actor_set_opacity (CLUTTER_ACTOR (rectangle), priv->color.alpha);
|
||||
|
||||
#if 0
|
||||
/* FIXME - appears to be causing border to always get drawn */
|
||||
if (clutter_color_equal (&priv->color, &priv->border_color))
|
||||
|
Loading…
Reference in New Issue
Block a user