Allow &mut self in overlay
This commit is contained in:
parent
67420cb1e4
commit
f1ada7a803
17 changed files with 73 additions and 83 deletions
|
|
@ -395,7 +395,7 @@ where
|
|||
}
|
||||
|
||||
pub(crate) fn overlay<'b>(
|
||||
&'b self,
|
||||
&'b mut self,
|
||||
tree: &'b mut Tree,
|
||||
layout: Layout<'_>,
|
||||
renderer: &Renderer,
|
||||
|
|
@ -415,13 +415,13 @@ where
|
|||
let controls_state = states.next().unwrap();
|
||||
|
||||
content
|
||||
.as_widget()
|
||||
.as_widget_mut()
|
||||
.overlay(title_state, title_layout, renderer)
|
||||
.or_else(move || {
|
||||
controls.as_ref().and_then(|controls| {
|
||||
controls.as_mut().and_then(|controls| {
|
||||
let controls_layout = children.next()?;
|
||||
|
||||
controls.as_widget().overlay(
|
||||
controls.as_widget_mut().overlay(
|
||||
controls_state,
|
||||
controls_layout,
|
||||
renderer,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue