mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibWeb: Fix outer box-shadows after 063e66c
The shrink should only be applied for inner box-shadows.
This commit is contained in:
committed by
Alexander Kalenik
parent
c93df9ead9
commit
49366951ee
@@ -567,13 +567,12 @@ void paint_box_shadow(PaintContext& context,
|
||||
.device_content_rect = device_content_rect,
|
||||
};
|
||||
|
||||
params.border_radii.shrink(borders_data.top.width, borders_data.right.width, borders_data.bottom.width, borders_data.left.width);
|
||||
|
||||
if (box_shadow_data.placement == ShadowPlacement::Inner) {
|
||||
ScopedCornerRadiusClip corner_clipper { context, device_content_rect, border_radii, CornerClip::Outside };
|
||||
params.border_radii.shrink(borders_data.top.width, borders_data.right.width, borders_data.bottom.width, borders_data.left.width);
|
||||
ScopedCornerRadiusClip corner_clipper { context, device_content_rect, params.border_radii, CornerClip::Outside };
|
||||
context.painter().paint_inner_box_shadow_params(params);
|
||||
} else {
|
||||
ScopedCornerRadiusClip corner_clipper { context, device_content_rect, params.border_radii, CornerClip::Inside };
|
||||
ScopedCornerRadiusClip corner_clipper { context, device_content_rect, border_radii, CornerClip::Inside };
|
||||
context.painter().paint_outer_box_shadow_params(params);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user