diff --git a/Userland/Libraries/LibGUI/Breadcrumbbar.cpp b/Userland/Libraries/LibGUI/Breadcrumbbar.cpp index a8db7bf70f..0b320704c3 100644 --- a/Userland/Libraries/LibGUI/Breadcrumbbar.cpp +++ b/Userland/Libraries/LibGUI/Breadcrumbbar.cpp @@ -86,6 +86,10 @@ void Breadcrumbbar::append_segment(DeprecatedString text, Gfx::Bitmap const* ico if (on_segment_change && m_selected_segment != index) on_segment_change(index); }; + button.on_double_click = [this](auto modifiers) { + if (on_doubleclick) + on_doubleclick(modifiers); + }; button.on_focus_change = [this, index = m_segments.size()](auto has_focus, auto) { if (has_focus && on_segment_change && m_selected_segment != index) on_segment_change(index); @@ -154,7 +158,7 @@ void Breadcrumbbar::set_selected_segment(Optional index) void Breadcrumbbar::doubleclick_event(MouseEvent& event) { if (on_doubleclick) - on_doubleclick(event); + on_doubleclick(event.modifiers()); } void Breadcrumbbar::resize_event(ResizeEvent&) diff --git a/Userland/Libraries/LibGUI/Breadcrumbbar.h b/Userland/Libraries/LibGUI/Breadcrumbbar.h index 2122ec1a7b..0a16334194 100644 --- a/Userland/Libraries/LibGUI/Breadcrumbbar.h +++ b/Userland/Libraries/LibGUI/Breadcrumbbar.h @@ -37,7 +37,7 @@ public: Function on_segment_click; Function on_segment_drop; Function on_segment_drag_enter; - Function on_doubleclick; + Function on_doubleclick; protected: virtual void did_change_font() override; diff --git a/Userland/Libraries/LibGUI/PathBreadcrumbbar.cpp b/Userland/Libraries/LibGUI/PathBreadcrumbbar.cpp index f44b472065..78988a3df3 100644 --- a/Userland/Libraries/LibGUI/PathBreadcrumbbar.cpp +++ b/Userland/Libraries/LibGUI/PathBreadcrumbbar.cpp @@ -80,7 +80,7 @@ PathBreadcrumbbar::PathBreadcrumbbar(NonnullRefPtr location_text_b on_paths_drop(m_breadcrumbbar->segment_data(segment_index), event); }; - m_breadcrumbbar->on_doubleclick = [&](GUI::MouseEvent const&) { + m_breadcrumbbar->on_doubleclick = [&](auto) { show_location_text_box(); }; }