Reviewed-on: iris/iris#16 Reviewed-by: iris <2+iris@noreply.localhost> Co-authored-by: iris-ai <4+iris-ai@noreply.localhost>
16 lines
319 B
Rust
16 lines
319 B
Rust
use crate::prelude::*;
|
|
|
|
pub struct LayerOffset {
|
|
pub inner: StrongWidget,
|
|
pub offset: usize,
|
|
}
|
|
|
|
impl Widget for LayerOffset {
|
|
fn draw(&mut self, painter: &mut Painter) -> Size {
|
|
for _ in 0..self.offset {
|
|
painter.next_layer();
|
|
}
|
|
painter.widget(&self.inner).size()
|
|
}
|
|
}
|