From f330fdb6a735d104860adc3451a4fc95ebd8b273 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 22 Mar 2021 15:27:48 +0100 Subject: [PATCH] Clarify variable name Co-Authored-By: Nathan Sobo --- gpui/src/platform/mac/shaders/shaders.metal | 4 ++-- zed/src/file_finder.rs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gpui/src/platform/mac/shaders/shaders.metal b/gpui/src/platform/mac/shaders/shaders.metal index 22bb6eb53e..13b47d6090 100644 --- a/gpui/src/platform/mac/shaders/shaders.metal +++ b/gpui/src/platform/mac/shaders/shaders.metal @@ -36,8 +36,8 @@ fragment float4 quad_fragment( ) { float2 half_size = input.quad.size / 2.; float2 center = input.quad.origin + half_size; - float2 center_to_point = abs(input.position.xy - center) - half_size + input.quad.corner_radius; - float distance = length(max(0.0, center_to_point)) + min(0.0, max(center_to_point.x, center_to_point.y)) - input.quad.corner_radius; + float2 edge_to_point = abs(input.position.xy - center) - half_size + input.quad.corner_radius; + float distance = length(max(0.0, edge_to_point)) + min(0.0, max(edge_to_point.x, edge_to_point.y)) - input.quad.corner_radius; float4 coverage = float4(1.0, 1.0, 1.0, saturate(0.5 - distance)); return coverage * coloru_to_colorf(input.quad.background_color); diff --git a/zed/src/file_finder.rs b/zed/src/file_finder.rs index c121b2cc2e..c57b33c631 100644 --- a/zed/src/file_finder.rs +++ b/zed/src/file_finder.rs @@ -69,8 +69,7 @@ impl View for FileFinder { .with_margin_top(12.0) .with_uniform_padding(6.0) .with_corner_radius(6.0) - .with_background_color(ColorU::new(0xff, 0xf2, 0xf2, 0xff)) - // .with_background_color(ColorU::new(0xf2, 0xf2, 0xf2, 0xff)) + .with_background_color(ColorU::new(0xf2, 0xf2, 0xf2, 0xff)) .with_shadow( vec2f(0.0, 4.0), 12.0,