From d03467503262aaad5ae466391f449bd0ad091837 Mon Sep 17 00:00:00 2001 From: networkException Date: Mon, 30 May 2022 14:02:02 +0200 Subject: [PATCH] Browser: Always show menu for additional bookmarks when one is hidden This patch fixes the additional bookmarks menu button getting pushed all they way to the right until a bookmark is out of bounds of the bar by instead collapsing a bookmark into the menu as soon as it intersects with the additional button. --- Userland/Applications/Browser/BookmarksBarWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Applications/Browser/BookmarksBarWidget.cpp b/Userland/Applications/Browser/BookmarksBarWidget.cpp index c756725520..32dafe048b 100644 --- a/Userland/Applications/Browser/BookmarksBarWidget.cpp +++ b/Userland/Applications/Browser/BookmarksBarWidget.cpp @@ -233,7 +233,7 @@ void BookmarksBarWidget::update_content_size() for (size_t i = 0; i < m_bookmarks.size(); ++i) { auto& bookmark = m_bookmarks.at(i); - if (x_position + bookmark.width() > width()) { + if (x_position + bookmark.width() + m_additional->width() > width()) { m_last_visible_index = i; break; }