refactor project structure (start of redoing atomic branch without atomics)

This commit is contained in:
2025-12-11 05:25:58 -05:00
parent 38266debb6
commit 2dc5b0f62c
76 changed files with 540 additions and 442 deletions

View File

@@ -0,0 +1,23 @@
use crate::prelude::*;
pub struct LayerOffset {
pub inner: WidgetId,
pub offset: usize,
}
impl Widget for LayerOffset {
fn draw(&mut self, painter: &mut Painter) {
for _ in 0..self.offset {
painter.next_layer();
}
painter.widget(&self.inner);
}
fn desired_width(&mut self, ctx: &mut SizeCtx) -> Len {
ctx.width(&self.inner)
}
fn desired_height(&mut self, ctx: &mut SizeCtx) -> Len {
ctx.height(&self.inner)
}
}