diff options
author | 2021-11-04 19:22:29 +0700 | |
---|---|---|
committer | 2021-11-04 19:24:11 +0700 | |
commit | 023aded2772f0cd6abd716fe5c8624d5d22e21fa (patch) | |
tree | 1bdb1a4584d7acc688b081a299bb4431cd35c349 /native/src/widget/button.rs | |
parent | 343f9b7e2e594bd1fef1ed511d71e81f9c44e3d9 (diff) | |
download | iced-023aded2772f0cd6abd716fe5c8624d5d22e21fa.tar.gz iced-023aded2772f0cd6abd716fe5c8624d5d22e21fa.tar.bz2 iced-023aded2772f0cd6abd716fe5c8624d5d22e21fa.zip |
Rename `fill_rectangle` to `fill_quad` in `Renderer`
Diffstat (limited to '')
-rw-r--r-- | native/src/widget/button.rs | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/native/src/widget/button.rs b/native/src/widget/button.rs index 0d9eeebd..1d785f35 100644 --- a/native/src/widget/button.rs +++ b/native/src/widget/button.rs @@ -293,28 +293,32 @@ where if styling.background.is_some() || styling.border_width > 0.0 { if styling.shadow_offset != Vector::default() { // TODO: Implement proper shadow support - renderer.fill_rectangle(renderer::Quad { - bounds: Rectangle { - x: bounds.x + styling.shadow_offset.x, - y: bounds.y + styling.shadow_offset.y, - ..bounds + renderer.fill_quad( + renderer::Quad { + bounds: Rectangle { + x: bounds.x + styling.shadow_offset.x, + y: bounds.y + styling.shadow_offset.y, + ..bounds + }, + border_radius: styling.border_radius, + border_width: 0.0, + border_color: Color::TRANSPARENT, }, - background: Background::Color([0.0, 0.0, 0.0, 0.5].into()), - border_radius: styling.border_radius, - border_width: 0.0, - border_color: Color::TRANSPARENT, - }); + Background::Color([0.0, 0.0, 0.0, 0.5].into()), + ); } - renderer.fill_rectangle(renderer::Quad { - bounds, - background: styling + renderer.fill_quad( + renderer::Quad { + bounds, + border_radius: styling.border_radius, + border_width: styling.border_width, + border_color: styling.border_color, + }, + styling .background .unwrap_or(Background::Color(Color::TRANSPARENT)), - border_radius: styling.border_radius, - border_width: styling.border_width, - border_color: styling.border_color, - }); + ); } self.content.draw( |