FIX SIZE CACHE

This commit is contained in:
2025-12-17 00:09:20 -05:00
parent ecbb9e56e2
commit 1363f31fcd
9 changed files with 144 additions and 178 deletions

View File

@@ -1,4 +1,4 @@
use crate::{LayerId, Len, MaskIdx, PrimitiveHandle, TextureHandle, UiRegion, UiVec2, WidgetId};
use crate::{LayerId, MaskIdx, PrimitiveHandle, TextureHandle, UiRegion, WidgetId};
/// important non rendering data for retained drawing
#[derive(Debug)]
@@ -9,15 +9,6 @@ pub struct ActiveData {
pub textures: Vec<TextureHandle>,
pub primitives: Vec<PrimitiveHandle>,
pub children: Vec<WidgetId>,
pub resize: ResizeRef,
pub mask: MaskIdx,
pub layer: LayerId,
}
/// stores information for children about the highest level parent that needed their size
/// so that they can redraw the parent if their size changes
#[derive(Clone, Copy, Debug, Default)]
pub struct ResizeRef {
pub x: Option<(WidgetId, (UiVec2, Len))>,
pub y: Option<(WidgetId, (UiVec2, Len))>,
}