Remove trait-specific draw logic in iced_native

This commit is contained in:
Héctor Ramón Jiménez 2021-10-14 16:07:22 +07:00
parent 3aae45c191
commit 03b3493138
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
71 changed files with 641 additions and 3126 deletions

View file

@ -11,8 +11,7 @@ mod circle {
// implemented by `iced_wgpu` and other renderers.
use iced_graphics::{Backend, Defaults, Primitive, Renderer};
use iced_native::{
layout, mouse, Background, Color, Element, Hasher, Layout, Length,
Point, Rectangle, Size, Widget,
layout, Element, Hasher, Layout, Length, Point, Rectangle, Size, Widget,
};
pub struct Circle {
@ -55,20 +54,20 @@ mod circle {
&self,
_renderer: &mut Renderer<B>,
_defaults: &Defaults,
layout: Layout<'_>,
_layout: Layout<'_>,
_cursor_position: Point,
_viewport: &Rectangle,
) -> (Primitive, mouse::Interaction) {
(
Primitive::Quad {
bounds: layout.bounds(),
background: Background::Color(Color::BLACK),
border_radius: self.radius,
border_width: 0.0,
border_color: Color::TRANSPARENT,
},
mouse::Interaction::default(),
)
) {
// (
// Primitive::Quad {
// bounds: layout.bounds(),
// background: Background::Color(Color::BLACK),
// border_radius: self.radius,
// border_width: 0.0,
// border_color: Color::TRANSPARENT,
// },
// mouse::Interaction::default(),
// )
}
}