|
@@ -969,16 +969,16 @@ void ItemList::_notification(int p_what) {
|
|
|
}
|
|
|
|
|
|
if (all_fit) {
|
|
|
- float page = size.height - bg->get_minimum_size().height;
|
|
|
+ float page = MAX(0, size.height - bg->get_minimum_size().height);
|
|
|
float max = MAX(page, ofs.y + max_h);
|
|
|
if (auto_height)
|
|
|
auto_height_value = ofs.y + max_h + bg->get_minimum_size().height;
|
|
|
- scroll_bar->set_max(max);
|
|
|
- scroll_bar->set_page(page);
|
|
|
if (max <= page) {
|
|
|
scroll_bar->set_value(0);
|
|
|
scroll_bar->hide();
|
|
|
} else {
|
|
|
+ scroll_bar->set_max(max);
|
|
|
+ scroll_bar->set_page(page);
|
|
|
scroll_bar->show();
|
|
|
|
|
|
if (do_autoscroll_to_bottom)
|