Pass spread radius and offset to Shadow
This commit is contained in:
@@ -493,10 +493,12 @@ impl From<Underline> for Primitive {
|
||||
pub(crate) struct Shadow {
|
||||
pub order: DrawOrder,
|
||||
pub blur_radius: ScaledPixels,
|
||||
pub spread_radius: ScaledPixels,
|
||||
pub bounds: Bounds<ScaledPixels>,
|
||||
pub corner_radii: Corners<ScaledPixels>,
|
||||
pub content_mask: ContentMask<ScaledPixels>,
|
||||
pub color: Hsla,
|
||||
pub offset: Point<ScaledPixels>,
|
||||
}
|
||||
|
||||
impl From<Shadow> for Primitive {
|
||||
|
||||
@@ -2286,6 +2286,8 @@ impl<'a> WindowContext<'a> {
|
||||
content_mask: content_mask.scale(scale_factor),
|
||||
corner_radii: corner_radii.scale(scale_factor),
|
||||
color: shadow.color.opacity(opacity),
|
||||
spread_radius: shadow.spread_radius.scale(scale_factor),
|
||||
offset: shadow.offset.scale(scale_factor),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user