Add Renderer::Defaults and style inheritance
This commit is contained in:
parent
89a6b8a9a1
commit
8caa66be27
32 changed files with 224 additions and 150 deletions
|
|
@ -4,6 +4,7 @@ use iced_native::{column, Element, Layout, MouseCursor, Point};
|
|||
impl column::Renderer for Renderer {
|
||||
fn draw<Message>(
|
||||
&mut self,
|
||||
defaults: &Self::Defaults,
|
||||
content: &[Element<'_, Message, Self>],
|
||||
layout: Layout<'_>,
|
||||
cursor_position: Point,
|
||||
|
|
@ -17,7 +18,7 @@ impl column::Renderer for Renderer {
|
|||
.zip(layout.children())
|
||||
.map(|(child, layout)| {
|
||||
let (primitive, new_mouse_cursor) =
|
||||
child.draw(self, layout, cursor_position);
|
||||
child.draw(self, defaults, layout, cursor_position);
|
||||
|
||||
if new_mouse_cursor > mouse_cursor {
|
||||
mouse_cursor = new_mouse_cursor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue