theme-node: Fix box-shadows for prerendered textures
The material of prerendered backgrounds is now painted in the rectangle determined by st_theme_node_get_paint_box(). As the ClutterActorBox returned from that function includes the space needed to draw the box shadow, the background ends up occluding the shadow. As the box shadow is not part of the background, factor out a new helper function which excludes the box shadow, and use it to prerender and place the background material. https://bugzilla.gnome.org/show_bug.cgi?id=641522
This commit is contained in:
@@ -748,7 +748,7 @@ st_theme_node_render_background_with_border (StThemeNode *node)
|
||||
* may need to create an image bigger than the nodes
|
||||
* allocation
|
||||
*/
|
||||
st_theme_node_get_paint_box (node, &actor_box, &paint_box);
|
||||
st_theme_node_get_background_paint_box (node, &actor_box, &paint_box);
|
||||
|
||||
/* translate the boxes so the paint box is at 0,0
|
||||
*/
|
||||
@@ -1691,7 +1691,9 @@ st_theme_node_paint (StThemeNode *node,
|
||||
{
|
||||
ClutterActorBox paint_box;
|
||||
|
||||
st_theme_node_get_paint_box (node, &allocation, &paint_box);
|
||||
st_theme_node_get_background_paint_box (node,
|
||||
&allocation,
|
||||
&paint_box);
|
||||
|
||||
paint_material_with_opacity (node->prerendered_material,
|
||||
&paint_box,
|
||||
|
Reference in New Issue
Block a user