Add Renderer::Defaults and style inheritance
This commit is contained in:
parent
89a6b8a9a1
commit
8caa66be27
32 changed files with 224 additions and 150 deletions
|
|
@ -173,10 +173,11 @@ where
|
|||
fn draw(
|
||||
&self,
|
||||
renderer: &mut Renderer,
|
||||
defaults: &Renderer::Defaults,
|
||||
layout: Layout<'_>,
|
||||
cursor_position: Point,
|
||||
) -> Renderer::Output {
|
||||
renderer.draw(&self.children, layout, cursor_position)
|
||||
renderer.draw(defaults, &self.children, layout, cursor_position)
|
||||
}
|
||||
|
||||
fn hash_layout(&self, state: &mut Hasher) {
|
||||
|
|
@ -213,6 +214,7 @@ pub trait Renderer: crate::Renderer + Sized {
|
|||
/// [`Layout`]: ../layout/struct.Layout.html
|
||||
fn draw<Message>(
|
||||
&mut self,
|
||||
defaults: &Self::Defaults,
|
||||
content: &[Element<'_, Message, Self>],
|
||||
layout: Layout<'_>,
|
||||
cursor_position: Point,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue