Rename a length's abs component to px

`dp` is coming, and then `abs` says which of the two it is not. The
component has always been a pixel count, so the name that admits it is
the one that leaves room for a second unit beside it.

Mechanical: the field on `Len` and `UiScalar`, their constructors,
`to_abs`/`get_abs`, the matching WGSL struct member and the locals
composing it. Field order and types are unchanged, so the `Pod` layout
the shader reads is the same bytes. `f32::abs` is untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
iris-aiandClaude Opus 5 committed 2026-09-14 22:29:20 -04:00
1 parent 3f7cd8251b
commit 7c50a3e51b
22 files changed
+120 -124

No files matched your search

+3 -3
View File
@@ -12,7 +12,7 @@ pub struct Scroll {
impl Widget for Scroll {
fn draw(&mut self, painter: &mut Painter) -> Size {
let output_len = painter.output_len(self.axis);
let container_len = UiScalar::abs(painter.px_len(self.axis));
let container_len = UiScalar::px(painter.px_len(self.axis));
// Draw in the whole container only when its scrolling-axis length is
// not already known, then place it at the scrolled offset.
let known_len = painter.known_len(&self.inner, self.axis, UiRegion::FULL);
@@ -22,8 +22,8 @@ impl Widget for Scroll {
.unwrap_or_else(|| child.unwrap().axis(self.axis))
.apply_rest()
.within_len(container_len)
.to_abs(output_len);
self.container_len = container_len.to_abs(output_len);
.to_px(output_len);
self.container_len = container_len.to_px(output_len);
self.content_len = content_len;
if self.snap_end {