Attempting to fix scroll
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user