back to retained...
This commit is contained in:
@@ -85,24 +85,24 @@ impl<'a> PainterCtx<'a> {
|
||||
};
|
||||
|
||||
if let Some((rid, size)) = active.resize {
|
||||
let checked = &mut HashMap::default();
|
||||
let mut ctx = SizeCtx {
|
||||
checked,
|
||||
text: self.text,
|
||||
textures: self.textures,
|
||||
widgets: self.widgets,
|
||||
size: UiVec2::FULL_SIZE,
|
||||
screen_size: self.screen_size,
|
||||
px_dependent: self.px_dependent,
|
||||
id,
|
||||
};
|
||||
let desired = ctx.size_inner(id, active.region.size());
|
||||
if size != desired {
|
||||
self.redraw(rid);
|
||||
if self.draw_started.contains(&id) {
|
||||
return;
|
||||
}
|
||||
// let checked = &mut HashMap::default();
|
||||
// let mut ctx = SizeCtx {
|
||||
// checked,
|
||||
// text: self.text,
|
||||
// textures: self.textures,
|
||||
// widgets: self.widgets,
|
||||
// size: UiVec2::FULL_SIZE,
|
||||
// screen_size: self.screen_size,
|
||||
// px_dependent: self.px_dependent,
|
||||
// id,
|
||||
// };
|
||||
// let desired = ctx.size_inner(id, active.region.size());
|
||||
// if size != desired {
|
||||
self.redraw(rid);
|
||||
if self.draw_started.contains(&id) {
|
||||
return;
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
let Some(active) = self.remove(id) else {
|
||||
@@ -210,7 +210,9 @@ impl<'a> PainterCtx<'a> {
|
||||
layer,
|
||||
};
|
||||
for (cid, size) in sized_children {
|
||||
if let Some(w) = self.active.get_mut(&cid) {
|
||||
if let Some(w) = self.active.get_mut(&cid)
|
||||
&& w.resize.is_none()
|
||||
{
|
||||
w.resize = Some((id, size))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user