LibGUI: Remove calculated_min_size() for ListViews

Originally implemented to handle resizable ComboBox windows, this
"feature" no longer exists, so calculating min size is no longer
necessary. The calculation was also failing to account for dynamic
ListViews properly.

This patch simplifies things by setting ComboBox ListView's minimum size
explicitly and deferring to AbstractScrollableWidget's more flexible
calculated implementation otherwise.

Fixes FontPicker resizing incorrectly due to overly rigid ListViews.
This commit is contained in:
thankyouverycool 2023-04-02 13:26:02 -04:00 committed by Andreas Kling
commit 99f28cf4ac
Notes: sideshowbarker 2024-07-17 08:25:15 +09:00
3 changed files with 1 additions and 15 deletions

View file

@ -257,6 +257,7 @@ void ComboBox::open()
}
rect.intersect(desktop);
m_list_window->set_rect(rect);
m_list_view->set_min_size(rect.size());
if (m_selected_index.has_value())
m_list_view->set_cursor(m_selected_index.value(), AbstractView::SelectionUpdate::Set);