Skip to content

Commit

Permalink
ShadowEffect: let Clutter know the shadow's size (#1500)
Browse files Browse the repository at this point in the history
Seems to stop shadows from lingering around. Fixes #1443, hopefully.
  • Loading branch information
GranPC committed Dec 21, 2022
1 parent b094d22 commit 34a208e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/ShadowEffect.vala
Expand Up @@ -159,5 +159,18 @@ namespace Gala {

return bounding_box;
}

public override bool modify_paint_volume (Clutter.PaintVolume volume) {
var size = shadow_size * scale_factor;
volume.set_width (volume.get_width () + size * 2);
volume.set_height (volume.get_height () + size * 2);

var origin = volume.get_origin ();
origin.x -= size;
origin.y -= size;
volume.set_origin (origin);

return true;
}
}
}

0 comments on commit 34a208e

Please sign in to comment.