Make alignment a widget property

This commit is contained in:
iris-ai committed 2026-09-15 23:12:16 -04:00
1 parent 8220a78d4a
commit d3b0ebf90c
21 files changed
+823 -300

No files matched your search

+9
View File
@@ -188,6 +188,15 @@ impl UiScalar {
}
}
/// Both channels by the same factor, which is what a fraction of a
/// length means when the length is part pixels and part a share.
pub const fn scale(&self, by: f32) -> Self {
Self {
rel: self.rel * by,
px: self.px * by,
}
}
pub const fn offset(mut self, amt: f32) -> Self {
self.px += amt;
self