From 023aded2772f0cd6abd716fe5c8624d5d22e21fa Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 4 Nov 2021 19:22:29 +0700 Subject: Rename `fill_rectangle` to `fill_quad` in `Renderer` --- native/src/widget/container.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'native/src/widget/container.rs') diff --git a/native/src/widget/container.rs b/native/src/widget/container.rs index 9e3d0193..596af7fd 100644 --- a/native/src/widget/container.rs +++ b/native/src/widget/container.rs @@ -238,6 +238,7 @@ where } } +/// Draws the background of a [`Container`] given its [`Style`] and its `bounds`. pub fn draw_background( renderer: &mut Renderer, style: &Style, @@ -246,15 +247,17 @@ pub fn draw_background( Renderer: crate::Renderer, { if style.background.is_some() || style.border_width > 0.0 { - renderer.fill_rectangle(renderer::Quad { - bounds, - background: style + renderer.fill_quad( + renderer::Quad { + bounds, + border_radius: style.border_radius, + border_width: style.border_width, + border_color: style.border_color, + }, + style .background .unwrap_or(Background::Color(Color::TRANSPARENT)), - border_radius: style.border_radius, - border_width: style.border_width, - border_color: style.border_color, - }); + ); } } -- cgit