mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-05 03:33:30 +00:00
The scrollbar now is also deactivate when nothing to scroll.
set_size() also should call set_scrollbar_button_status(), which is now done.
This commit is contained in:
parent
3495b3551b
commit
d86efb4a34
@ -235,6 +235,9 @@ void tlistbox::set_scrollbar_button_status()
|
||||
button->set_active(!scrollbar()->at_end());
|
||||
}
|
||||
}
|
||||
|
||||
// Set the scrollbar itself
|
||||
scrollbar()->set_active(!(scrollbar()->at_begin() && scrollbar()->at_end()));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -375,6 +378,7 @@ void tlistbox::set_size(const SDL_Rect& rect)
|
||||
} else {
|
||||
scrollbar()->set_visible_items(1);
|
||||
}
|
||||
set_scrollbar_button_status();
|
||||
}
|
||||
|
||||
twidget* tlistbox::find_widget(const tpoint& coordinate, const bool must_be_active)
|
||||
|
Loading…
x
Reference in New Issue
Block a user