mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
actor: use paint opacity to paint the background color
This commit is contained in:
parent
414f8c1a0f
commit
75549456fd
@ -677,6 +677,8 @@ static void _clutter_actor_get_relative_transformation_matrix (ClutterActor *sel
|
||||
|
||||
static ClutterPaintVolume *_clutter_actor_get_paint_volume_mutable (ClutterActor *self);
|
||||
|
||||
static guint8 clutter_actor_get_paint_opacity_internal (ClutterActor *self);
|
||||
|
||||
static void on_layout_manager_changed (ClutterLayoutManager *manager,
|
||||
ClutterActor *self);
|
||||
|
||||
@ -2997,13 +2999,18 @@ clutter_actor_real_paint (ClutterActor *actor)
|
||||
if (priv->bg_color_set)
|
||||
{
|
||||
float width, height;
|
||||
guint8 real_alpha;
|
||||
|
||||
clutter_actor_box_get_size (&priv->allocation, &width, &height);
|
||||
|
||||
real_alpha = clutter_actor_get_paint_opacity_internal (actor)
|
||||
* priv->bg_color.alpha
|
||||
/ 255;
|
||||
|
||||
cogl_set_source_color4ub (priv->bg_color.red,
|
||||
priv->bg_color.green,
|
||||
priv->bg_color.blue,
|
||||
priv->bg_color.alpha);
|
||||
real_alpha);
|
||||
|
||||
cogl_rectangle (0, 0, width, height);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user