Fix overlay flickering when layout is invalidated
This commit is contained in:
parent
6155100767
commit
bb78f1f336
1 changed files with 24 additions and 1 deletions
|
|
@ -341,7 +341,30 @@ where
|
|||
&layout::Limits::new(Size::ZERO, self.bounds),
|
||||
);
|
||||
|
||||
self.overlay = None;
|
||||
if let Some(mut overlay) = self
|
||||
.root
|
||||
.as_widget_mut()
|
||||
.overlay(
|
||||
&mut self.state,
|
||||
Layout::new(&self.base),
|
||||
renderer,
|
||||
&viewport,
|
||||
Vector::ZERO,
|
||||
)
|
||||
.map(overlay::Nested::new)
|
||||
{
|
||||
let layout = overlay.layout(renderer, self.bounds);
|
||||
let interaction = overlay.mouse_interaction(
|
||||
Layout::new(&layout),
|
||||
cursor,
|
||||
renderer,
|
||||
);
|
||||
|
||||
self.overlay = Some(Overlay {
|
||||
layout,
|
||||
interaction,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if shell.are_widgets_invalid() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue