Fix corner_radii
clamping for Img
when actual size is smaller than the container (#27473)
Noticed this when working on #27472 Release Notes: - N/A
This commit is contained in:
parent
e091c5faaf
commit
df583d73b9
1 changed files with 4 additions and 4 deletions
|
@ -421,15 +421,15 @@ impl Element for Img {
|
||||||
window,
|
window,
|
||||||
cx,
|
cx,
|
||||||
|style, window, cx| {
|
|style, window, cx| {
|
||||||
let corner_radii = style
|
|
||||||
.corner_radii
|
|
||||||
.to_pixels(window.rem_size())
|
|
||||||
.clamp_radii_for_quad_size(bounds.size);
|
|
||||||
if let Some(Ok(data)) = source.use_data(window, cx) {
|
if let Some(Ok(data)) = source.use_data(window, cx) {
|
||||||
let new_bounds = self
|
let new_bounds = self
|
||||||
.style
|
.style
|
||||||
.object_fit
|
.object_fit
|
||||||
.get_bounds(bounds, data.size(layout_state.frame_index));
|
.get_bounds(bounds, data.size(layout_state.frame_index));
|
||||||
|
let corner_radii = style
|
||||||
|
.corner_radii
|
||||||
|
.to_pixels(window.rem_size())
|
||||||
|
.clamp_radii_for_quad_size(new_bounds.size);
|
||||||
window
|
window
|
||||||
.paint_image(
|
.paint_image(
|
||||||
new_bounds,
|
new_bounds,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue