Attempting to fix scroll

This commit is contained in:
2026-02-21 20:02:12 +01:00
parent 88fe53b907
commit a49212ca64
@@ -69,9 +69,8 @@ public class Scroll extends Element {
int calculateScrollBarHeight() { int calculateScrollBarHeight() {
if (maxScroll <= 0) if (maxScroll <= 0)
return height - (scrollBarPadding.value * 2); // No scrolling needed return height - (scrollBarPadding.value * 2);
return Math.max(20, (height * height) / (height + maxScroll)) - (scrollBarPadding.value * 2); // At least 20px return Math.max(20, (height * height) / (height + maxScroll)) - (scrollBarPadding.value * 2);
// tall
} }
int calculateScrollBarY() { int calculateScrollBarY() {