store size in tex instead of bot_right

This commit is contained in:
2025-11-21 14:38:16 -05:00
parent c428de8fd5
commit 97b284e81e
5 changed files with 34 additions and 17 deletions

View File

@@ -74,6 +74,26 @@ impl Padding {
bottom: amt,
}
}
pub fn with_top(mut self, amt: impl UiNum) -> Self {
self.top = amt.to_f32();
self
}
pub fn with_bottom(mut self, amt: impl UiNum) -> Self {
self.bottom = amt.to_f32();
self
}
pub fn with_left(mut self, amt: impl UiNum) -> Self {
self.left = amt.to_f32();
self
}
pub fn with_right(mut self, amt: impl UiNum) -> Self {
self.right = amt.to_f32();
self
}
}
impl<T: UiNum> From<T> for Padding {