mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 02:46:43 +00:00
Clarify variable name
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
123b7c55f6
commit
f330fdb6a7
2 changed files with 3 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue