Allocation layout and spaced items

This commit is contained in:
2026-07-15 00:02:13 +02:00
parent 7be4040267
commit b5470a9f05
2 changed files with 26 additions and 20 deletions
+2 -2
View File
@@ -57,13 +57,13 @@ impl From<Rect> for Point {
impl Allocation {
pub fn draw<W: Widget>(&self, index: usize, widget: W) {
let mut scope = RenderScope::new(self.widget_alloc[index]);
let mut scope = RenderScope::new(self.widgets[index]);
widget.render(&mut scope);
scope.draw();
}
pub fn draw_frame<W: Widget>(&self, index: usize, widget: W) {
let mut scope = RenderScope::new(self.frame_alloc[index]);
let mut scope = RenderScope::new(self.frame[index]);
widget.render(&mut scope);
scope.draw();
}