the great orientation refactor (move to x & y UiScalars/Spans) + don't call full size in align
This commit is contained in:
@@ -9,16 +9,10 @@ pub struct Sized {
|
||||
impl Sized {
|
||||
fn apply_to_outer(&self, ctx: &mut SizeCtx) {
|
||||
if let Some(x) = self.x {
|
||||
let outer = ctx.outer.axis(Axis::X);
|
||||
ctx.outer
|
||||
.axis_mut(Axis::X)
|
||||
.set(x.apply_rest().within_len(outer));
|
||||
ctx.outer.x.select_len(x.apply_rest());
|
||||
}
|
||||
if let Some(y) = self.y {
|
||||
let outer = ctx.outer.axis(Axis::Y);
|
||||
ctx.outer
|
||||
.axis_mut(Axis::Y)
|
||||
.set(y.apply_rest().within_len(outer));
|
||||
ctx.outer.y.select_len(y.apply_rest());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user