Interface Kit: fix menu resizing when scrolling is enabled
BMenuWindow::Attach/DetachScrollers can be called when scrollers are already attached/detached and it should handle this case properly. Call BMenuWindow::DetachScrollers when scrolling is not needed anymore. Fixes #8513. Change-Id: I1f70b63d75106cf33ab1f72d34e221a54b45a75e Reviewed-on: https://review.haiku-os.org/c/haiku/+/2310 Reviewed-by: Adrien Destugues <[email protected]> Reviewed-by: John Scipione <[email protected]>
This commit is contained in:
@@ -2931,6 +2931,9 @@ BMenu::_UpdateWindowViewSize(const bool &move)
|
||||
|
||||
if (fItems.CountItems() > 0) {
|
||||
if (!scroll) {
|
||||
if (fLayout == B_ITEMS_IN_COLUMN)
|
||||
window->DetachScrollers();
|
||||
|
||||
window->ResizeTo(Bounds().Width(), Bounds().Height());
|
||||
} else {
|
||||
BScreen screen(window);
|
||||
|
||||
Reference in New Issue
Block a user