mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 08:36:12 +00:00
LibGUI+WindowServer: Add menu minimum width support
This commit is contained in:
parent
adc845e0cb
commit
350affe406
Notes:
sideshowbarker
2024-07-17 05:06:13 +09:00
Author: https://github.com/bplaat
Commit: 350affe406
Pull-request: https://github.com/SerenityOS/serenity/pull/22925
Reviewed-by: https://github.com/ADKaster ✅
8 changed files with 56 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue