1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-31 18:41:20 +00:00

Fix ScrollContainer's bottom scroll hint ignoring margins

This commit is contained in:
Michael Alexsander
2025-12-15 11:51:06 -03:00
parent 08e6cd181f
commit 88d4d7222a

View File

@@ -606,7 +606,7 @@ void ScrollContainer::_update_scrollbars() {
void ScrollContainer::_update_scroll_hints() { void ScrollContainer::_update_scroll_hints() {
Size2 size = get_size(); Size2 size = get_size();
Rect2 margins = _get_margins(); Rect2 margins = _get_margins();
Size2 scroll_size = size - margins.position + margins.size; Size2 scroll_size = size - margins.position - margins.size;
float v_scroll_value = v_scroll->get_value(); float v_scroll_value = v_scroll->get_value();
bool v_scroll_below_max = v_scroll_value < (largest_child_min_size.height - scroll_size.height - 1); bool v_scroll_below_max = v_scroll_value < (largest_child_min_size.height - scroll_size.height - 1);