From cc906c83cdf896d94b7ccf91258466714be631f6 Mon Sep 17 00:00:00 2001 From: Nick Senger Date: Wed, 8 Nov 2023 19:12:53 -0800 Subject: feat: quad shadows --- examples/loading_spinners/src/linear.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'examples/loading_spinners/src/linear.rs') diff --git a/examples/loading_spinners/src/linear.rs b/examples/loading_spinners/src/linear.rs index 497e0834..86469681 100644 --- a/examples/loading_spinners/src/linear.rs +++ b/examples/loading_spinners/src/linear.rs @@ -228,6 +228,7 @@ where border_radius: 0.0.into(), border_width: 0.0, border_color: Color::TRANSPARENT, + shadow: Default::default(), }, Background::Color(custom_style.track_color), ); @@ -244,6 +245,7 @@ where border_radius: 0.0.into(), border_width: 0.0, border_color: Color::TRANSPARENT, + shadow: Default::default(), }, Background::Color(custom_style.bar_color), ), @@ -261,6 +263,7 @@ where border_radius: 0.0.into(), border_width: 0.0, border_color: Color::TRANSPARENT, + shadow: Default::default(), }, Background::Color(custom_style.bar_color), ), -- cgit From 370b2f6df799c948188d3949e34112258b2a8498 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 20 Jan 2024 12:25:07 +0100 Subject: Use `Default` implementation of `renderer::Quad` --- examples/loading_spinners/src/linear.rs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'examples/loading_spinners/src/linear.rs') diff --git a/examples/loading_spinners/src/linear.rs b/examples/loading_spinners/src/linear.rs index 86469681..03aee9b1 100644 --- a/examples/loading_spinners/src/linear.rs +++ b/examples/loading_spinners/src/linear.rs @@ -225,10 +225,7 @@ where width: bounds.width, height: bounds.height, }, - border_radius: 0.0.into(), - border_width: 0.0, - border_color: Color::TRANSPARENT, - shadow: Default::default(), + ..renderer::Quad::default() }, Background::Color(custom_style.track_color), ); @@ -242,10 +239,7 @@ where width: self.easing.y_at_x(*progress) * bounds.width, height: bounds.height, }, - border_radius: 0.0.into(), - border_width: 0.0, - border_color: Color::TRANSPARENT, - shadow: Default::default(), + ..renderer::Quad::default() }, Background::Color(custom_style.bar_color), ), @@ -260,10 +254,7 @@ where * bounds.width, height: bounds.height, }, - border_radius: 0.0.into(), - border_width: 0.0, - border_color: Color::TRANSPARENT, - shadow: Default::default(), + ..renderer::Quad::default() }, Background::Color(custom_style.bar_color), ), @@ -291,7 +282,7 @@ pub struct Appearance { pub bar_color: Color, } -impl std::default::Default for Appearance { +impl Default for Appearance { fn default() -> Self { Self { track_color: Color::TRANSPARENT, -- cgit