GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git
scroll-region: max_scroll/max_scroll_x are pub
Apps clamp scroll-into-view math against them (cce-fonts was the first
caller outside the struct).
Co-Authored-By: Claude Fable 5 <[email protected]>
src/widget/scroll_region.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/widget/scroll_region.rs b/src/widget/scroll_region.rs
index f6a728f..38cadd3 100644
--- a/src/widget/scroll_region.rs
+++ b/src/widget/scroll_region.rs
@@ -136,11 +136,11 @@ impl ScrollRegion {
self.content_w > self.w
}
- fn max_scroll(&self) -> f32 {
+ pub fn max_scroll(&self) -> f32 {
(self.content_h - self.viewport_h).max(0.0)
}
- fn max_scroll_x(&self) -> f32 {
+ pub fn max_scroll_x(&self) -> f32 {
(self.content_w - self.w).max(0.0)
}