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` --- widget/src/slider.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'widget/src/slider.rs') diff --git a/widget/src/slider.rs b/widget/src/slider.rs index d89f50e0..d12e0ebe 100644 --- a/widget/src/slider.rs +++ b/widget/src/slider.rs @@ -8,8 +8,8 @@ use crate::core::renderer; use crate::core::touch; use crate::core::widget::tree::{self, Tree}; use crate::core::{ - Clipboard, Color, Element, Layout, Length, Pixels, Point, Rectangle, Shell, - Size, Widget, + Clipboard, Element, Layout, Length, Pixels, Point, Rectangle, Shell, Size, + Widget, }; use std::ops::RangeInclusive; @@ -399,9 +399,7 @@ pub fn draw( height: style.rail.width, }, border_radius: style.rail.border_radius, - border_width: 0.0, - border_color: Color::TRANSPARENT, - shadow: Default::default(), + ..renderer::Quad::default() }, style.rail.colors.0, ); @@ -415,9 +413,7 @@ pub fn draw( height: style.rail.width, }, border_radius: style.rail.border_radius, - border_width: 0.0, - border_color: Color::TRANSPARENT, - shadow: Default::default(), + ..renderer::Quad::default() }, style.rail.colors.1, ); @@ -433,7 +429,7 @@ pub fn draw( border_radius: handle_border_radius, border_width: style.handle.border_width, border_color: style.handle.border_color, - shadow: Default::default(), + ..renderer::Quad::default() }, style.handle.color, ); -- cgit