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/element.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 'native/src/element.rs')
-rw-r--r-- | native/src/element.rs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/native/src/element.rs b/native/src/element.rs index 50ff9424..ee404a1c 100644 --- a/native/src/element.rs +++ b/native/src/element.rs @@ -4,8 +4,7 @@ use crate::mouse; use crate::overlay; use crate::renderer; use crate::{ - Background, Clipboard, Color, Hasher, Layout, Length, Point, Rectangle, - Widget, + Clipboard, Color, Hasher, Layout, Length, Point, Rectangle, Widget, }; /// A generic [`Widget`]. @@ -254,6 +253,7 @@ where .draw(renderer, style, layout, cursor_position, viewport) } + /// Returns the current [`mouse::Interaction`] of the [`Element`]. pub fn mouse_interaction( &self, layout: Layout<'_>, @@ -452,13 +452,15 @@ where color: Color, layout: Layout<'_>, ) { - renderer.fill_rectangle(renderer::Quad { - bounds: layout.bounds(), - border_color: color, - border_width: 1.0, - border_radius: 0.0, - background: Background::Color(Color::TRANSPARENT), - }); + renderer.fill_quad( + renderer::Quad { + bounds: layout.bounds(), + border_color: color, + border_width: 1.0, + border_radius: 0.0, + }, + Color::TRANSPARENT, + ); for child in layout.children() { explain_layout(renderer, color, child); |