mirror of
https://github.com/brl/mutter.git
synced 2025-02-18 14:14:10 +00:00
* clutter/clutter-rectangle.c (clutter_rectangle_paint): Fixed so
that it doesn't use the alpha value from the border colour to draw the rectangle
This commit is contained in:
parent
f59da4d7a4
commit
3fdb6e5ca7
@ -1,3 +1,9 @@
|
|||||||
|
2008-11-12 Neil Roberts <neil@linux.intel.com>
|
||||||
|
|
||||||
|
* clutter/clutter-rectangle.c (clutter_rectangle_paint): Fixed so
|
||||||
|
that it doesn't use the alpha value from the border colour to draw
|
||||||
|
the rectangle
|
||||||
|
|
||||||
2008-11-12 Neil Roberts <neil@linux.intel.com>
|
2008-11-12 Neil Roberts <neil@linux.intel.com>
|
||||||
|
|
||||||
* clutter/cogl/gles/Makefile.am (libclutterinclude_HEADERS):
|
* clutter/cogl/gles/Makefile.am (libclutterinclude_HEADERS):
|
||||||
|
@ -85,6 +85,11 @@ clutter_rectangle_paint (ClutterActor *self)
|
|||||||
: "unknown");
|
: "unknown");
|
||||||
clutter_actor_get_allocation_geometry (self, &geom);
|
clutter_actor_get_allocation_geometry (self, &geom);
|
||||||
|
|
||||||
|
/* parent paint call will have translated us into position so
|
||||||
|
* paint from 0, 0
|
||||||
|
*/
|
||||||
|
if (priv->has_border)
|
||||||
|
{
|
||||||
/* compute the composited opacity of the actor taking into
|
/* compute the composited opacity of the actor taking into
|
||||||
* account the opacity of the color set by the user
|
* account the opacity of the color set by the user
|
||||||
*/
|
*/
|
||||||
@ -92,11 +97,6 @@ clutter_rectangle_paint (ClutterActor *self)
|
|||||||
* priv->border_color.alpha
|
* priv->border_color.alpha
|
||||||
/ 255;
|
/ 255;
|
||||||
|
|
||||||
/* parent paint call will have translated us into position so
|
|
||||||
* paint from 0, 0
|
|
||||||
*/
|
|
||||||
if (priv->has_border)
|
|
||||||
{
|
|
||||||
/* paint the border */
|
/* paint the border */
|
||||||
cogl_color_set_from_4ub (&tmp_col,
|
cogl_color_set_from_4ub (&tmp_col,
|
||||||
priv->border_color.red,
|
priv->border_color.red,
|
||||||
@ -123,6 +123,10 @@ clutter_rectangle_paint (ClutterActor *self)
|
|||||||
priv->border_width,
|
priv->border_width,
|
||||||
geom.height - priv->border_width);
|
geom.height - priv->border_width);
|
||||||
|
|
||||||
|
tmp_alpha = clutter_actor_get_paint_opacity (self)
|
||||||
|
* priv->color.alpha
|
||||||
|
/ 255;
|
||||||
|
|
||||||
/* now paint the rectangle */
|
/* now paint the rectangle */
|
||||||
cogl_color_set_from_4ub (&tmp_col,
|
cogl_color_set_from_4ub (&tmp_col,
|
||||||
priv->color.red,
|
priv->color.red,
|
||||||
@ -137,6 +141,13 @@ clutter_rectangle_paint (ClutterActor *self)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* 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 (self)
|
||||||
|
* priv->color.alpha
|
||||||
|
/ 255;
|
||||||
|
|
||||||
cogl_color_set_from_4ub (&tmp_col,
|
cogl_color_set_from_4ub (&tmp_col,
|
||||||
priv->color.red,
|
priv->color.red,
|
||||||
priv->color.green,
|
priv->color.green,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user