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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user