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.
This commit is contained in:
networkException 2022-05-30 14:02:02 +02:00 committed by Linus Groh
parent a506ec08d8
commit d034675032
Notes: sideshowbarker 2024-07-18 01:43:16 +09:00

View file

@ -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;
}