Say on_axis for the lift, so it is not indexing's word
`PlaceDescAxis::axis(axis)` shared its name with `PlaceDesc`'s extraction, which is now `Index<Axis>` and reads `place[axis]`. The two go opposite directions, so they get different words: `on_axis` pairs with the `from_axis` it is the shorthand for. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2807a925af
commit
4d42f1c8ca
6 files changed
+9
-9
No files matched your search
@@ -24,12 +24,12 @@ impl Widget for BranchesOnMeasurement {
|
||||
let cut = Len::from_parts(Rel::ZERO, Px::from_int(40));
|
||||
let top = UiSpan::new(Len::ZERO, cut).shifted_desc();
|
||||
let measured = painter
|
||||
.widget_at(&self.probe, top.axis(Axis::Y))
|
||||
.widget_at(&self.probe, top.on_axis(Axis::Y))
|
||||
.len(Axis::X);
|
||||
let px = painter.to_px(measured.apply_leftover(), Axis::X);
|
||||
|
||||
let below = UiSpan::new(cut, painter.region_len(Axis::Y)).shifted_desc();
|
||||
let place = below.axis(Axis::Y);
|
||||
let place = below.on_axis(Axis::Y);
|
||||
match px > Px::from_f32(self.threshold) {
|
||||
true => painter.widget_at(&self.wide, place),
|
||||
false => painter.widget_at(&self.narrow, place),
|
||||
|
||||
@@ -214,7 +214,7 @@ impl Widget for FromHint {
|
||||
fn draw(&mut self, painter: &mut Painter) -> Size {
|
||||
let len = painter.size_hint(&self.inner, Axis::Y).unwrap();
|
||||
let top = UiSpan::new(Len::ZERO, Len::from_parts(Rel::ZERO, len.px));
|
||||
painter.widget_at(&self.inner, top.shifted_desc().axis(Axis::Y));
|
||||
painter.widget_at(&self.inner, top.shifted_desc().on_axis(Axis::Y));
|
||||
Size::LEFTOVER
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user