1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 15:27:34 +00:00

LibGUI+WindowServer: Add menu minimum width support

This commit is contained in:
Bastiaan van der Plaat 2024-01-25 18:57:37 +01:00 committed by Andrew Kaster
parent adc845e0cb
commit 350affe406
8 changed files with 56 additions and 10 deletions

View file

@ -560,10 +560,10 @@ Tab::Tab(BrowserWindow& window)
view().select_dropdown_closed({});
};
view().on_request_select_dropdown = [this](Gfx::IntPoint content_position, i32, Vector<Web::HTML::SelectItem> items) {
view().on_request_select_dropdown = [this](Gfx::IntPoint content_position, i32 minimum_width, Vector<Web::HTML::SelectItem> items) {
m_select_dropdown_closed_by_action = false;
m_select_dropdown->remove_all_actions();
// FIXME: Set menu minimum width
m_select_dropdown->set_minimum_width(minimum_width);
for (auto const& item : items) {
select_dropdown_add_item(*m_select_dropdown, item);
}