Pull logic for clamping corner rounding radii out of Corners::to_pixels
(#27460)
This seems more correct as corners are not necessarily only for rounding radii. Also applies clamping after scaling in `paint_quad`, deduplicating that logic. This also provides a more precise result by doing the clamping after scaling, avoiding floating point rounding issues (probably a non-issue). Release Notes: - N/A
This commit is contained in:
parent
76192ea93c
commit
8c8f50d916
4 changed files with 55 additions and 27 deletions
|
@ -421,7 +421,7 @@ impl Element for Img {
|
|||
window,
|
||||
cx,
|
||||
|style, window, cx| {
|
||||
let corner_radii = style.corner_radii.to_pixels(bounds.size, window.rem_size());
|
||||
let corner_radii = style.corner_radii.to_pixels(window.rem_size());
|
||||
|
||||
if let Some(Ok(data)) = source.use_data(window, cx) {
|
||||
let new_bounds = self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue