LibGUI: Tighten invalidation rect for TabWidget

Previously the whole bar was repainted, there's no need to invalidate
past the last tab button.
This commit is contained in:
Marcus Nilsson 2021-07-19 12:01:04 +02:00 committed by Gunnar Beutner
parent b57f7def1f
commit bab83ecc95

View file

@ -412,6 +412,7 @@ void TabWidget::update_bar()
{
auto invalidation_rect = bar_rect();
invalidation_rect.set_height(invalidation_rect.height() + 1);
invalidation_rect.set_right(button_rect(static_cast<int>(m_tabs.size() - 1)).right());
update(invalidation_rect);
}