Checkpoint

Antonio Scandurra created

Change summary

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(-)

Detailed changes

crates/gpui3/src/elements/img.rs 🔗

@@ -72,7 +72,7 @@ impl<S: Send + Sync + 'static> Element for Img<S> {
                 .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 {

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 {

crates/gpui3/src/style_helpers.rs 🔗

@@ -227,8 +227,8 @@ pub trait StyleHelpers: Styled<Style = Style> {
     {
         self.declared_style().box_shadow = Some(BoxShadow {
             color: hsla(0., 0., 0., 1.),
-            offset: point(px(0.), px(0.)),
-            blur_radius: px(1.),
+            offset: point(px(0.), px(1.)),
+            blur_radius: px(2.),
             spread_radius: px(0.),
         });
         self