fix: update for applet widgets and grid
This commit is contained in:
parent
dfa7d89915
commit
a7027e6119
3 changed files with 76 additions and 73 deletions
|
|
@ -320,12 +320,13 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
self.children
|
||||
for (((i, child), state), c_layout) in self
|
||||
.children
|
||||
.iter_mut()
|
||||
.enumerate()
|
||||
.zip(&mut tree.children)
|
||||
.zip(layout.children())
|
||||
.map(|(((i, child), state), c_layout)| {
|
||||
{
|
||||
let mut cursor_virtual = cursor;
|
||||
if matches!(
|
||||
event,
|
||||
|
|
@ -360,8 +361,8 @@ where
|
|||
clipboard,
|
||||
shell,
|
||||
viewport,
|
||||
)
|
||||
});
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn mouse_interaction(
|
||||
|
|
|
|||
|
|
@ -309,12 +309,13 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
self.children
|
||||
for (((i, child), state), c_layout) in self
|
||||
.children
|
||||
.iter_mut()
|
||||
.enumerate()
|
||||
.zip(&mut tree.children)
|
||||
.zip(layout.children())
|
||||
.map(|(((i, child), state), c_layout)| {
|
||||
{
|
||||
let mut cursor_virtual = cursor;
|
||||
|
||||
if matches!(
|
||||
|
|
@ -350,8 +351,8 @@ where
|
|||
clipboard,
|
||||
shell,
|
||||
viewport,
|
||||
)
|
||||
});
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn mouse_interaction(
|
||||
|
|
|
|||
|
|
@ -189,11 +189,12 @@ impl<Message: 'static + Clone> Widget<Message, crate::Theme, Renderer> for Grid<
|
|||
shell: &mut Shell<'_, Message>,
|
||||
viewport: &Rectangle,
|
||||
) {
|
||||
self.children
|
||||
for ((child, state), c_layout) in self
|
||||
.children
|
||||
.iter_mut()
|
||||
.zip(&mut tree.children)
|
||||
.zip(layout.children())
|
||||
.map(|((child, state), c_layout)| {
|
||||
{
|
||||
child.as_widget_mut().update(
|
||||
state,
|
||||
event,
|
||||
|
|
@ -203,8 +204,8 @@ impl<Message: 'static + Clone> Widget<Message, crate::Theme, Renderer> for Grid<
|
|||
clipboard,
|
||||
shell,
|
||||
viewport,
|
||||
)
|
||||
});
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn mouse_interaction(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue