From f3560caf93869aff085a6352314c72d5119a688b Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 5 Oct 2023 15:34:57 +0200 Subject: [PATCH] Checkpoint --- crates/gpui3/src/elements/img.rs | 2 +- crates/gpui3/src/platform/mac/shaders.metal | 2 +- crates/gpui3/src/style_helpers.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/gpui3/src/elements/img.rs b/crates/gpui3/src/elements/img.rs index 49ed91fbde6f7620e7902ae9bf66b565c446d570..d4c0ac4373e0793a00ac0de569e04f4d18782c18 100644 --- a/crates/gpui3/src/elements/img.rs +++ b/crates/gpui3/src/elements/img.rs @@ -72,7 +72,7 @@ impl Element for Img { .now_or_never() .and_then(ResultExt::log_err) { - let corner_radii = style.corner_radii.to_pixels(bounds, cx.rem_size()); + let corner_radii = style.corner_radii.to_pixels(bounds.size, cx.rem_size()); cx.paint_image(bounds, corner_radii, order, data, self.grayscale)?; } else { cx.spawn(|_, mut cx| async move { diff --git a/crates/gpui3/src/platform/mac/shaders.metal b/crates/gpui3/src/platform/mac/shaders.metal index 5e37b48027c3f82d1edd53f0ff038f14a229b60b..d079d2b80876d9e6a905e8ea7cb1ca46b9263733 100644 --- a/crates/gpui3/src/platform/mac/shaders.metal +++ b/crates/gpui3/src/platform/mac/shaders.metal @@ -138,7 +138,7 @@ vertex ShadowVertexOutput shadow_vertex( bounds.size.width += 2. * margin; bounds.size.height += 2. * margin; - float4 device_position = to_device_position(unit_vertex, bounds, bounds, viewport_size); + float4 device_position = to_device_position(unit_vertex, bounds, shadow.content_mask.bounds, viewport_size); float4 color = hsla_to_rgba(shadow.color); return ShadowVertexOutput { diff --git a/crates/gpui3/src/style_helpers.rs b/crates/gpui3/src/style_helpers.rs index 109edba90c4a0a17617004b227bf4a53906dc601..a763e95d1f8a208bd4c99b459530833a2bff8989 100644 --- a/crates/gpui3/src/style_helpers.rs +++ b/crates/gpui3/src/style_helpers.rs @@ -227,8 +227,8 @@ pub trait StyleHelpers: Styled