git.lucas.co / cce-ui
GPU-accelerated UI toolkit (Vulkan)
git clone https://git.lucas.co/cce-ui.git

commit48b0a433b25cb6d80a1718b80958dfbf8809e08c
parent764d9e74b8
authorLucas Galante <[email protected]>
date2026-09-01 08:37
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)
     }