change default text align and fix scroll drawing

This commit is contained in:
2025-11-21 13:31:49 -05:00
parent 5785352ac0
commit c428de8fd5
3 changed files with 5 additions and 6 deletions

View File

@@ -24,7 +24,8 @@ impl Widget for Scroll {
self.amt = self.content_len - self.container_len;
}
self.update_amt();
let region = UiRegion::FULL.offset(Vec2::from_axis(self.axis, -self.amt, 0.0));
let mut region = UiRegion::FULL.offset(Vec2::from_axis(self.axis, -self.amt, 0.0));
region.axis_mut(self.axis).end = region.axis(self.axis).start.offset(self.content_len);
painter.widget_within(&self.inner, region);
}