mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:07:45 +00:00
LibGUI: Allow double-clicking PathBreadcrumbbar buttons to edit path
When viewing a deeply nested path, there may be very little of the PathBreadcrumbbar itself visible to double-click on. This solves that by allowing double-clicks on its segment buttons to behave the same. (With the caveat that it first selects the double-clicked segment.) In order to make this work, `on_double_click` now takes the modifiers instead of the MouseEvent. In this case we don't use it so that's fine, but maybe we should make all mouse callbacks consistently take the MouseEvent& as a parameter.
This commit is contained in:
parent
8f717927f2
commit
5b77346f53
3 changed files with 7 additions and 3 deletions
|
@ -80,7 +80,7 @@ PathBreadcrumbbar::PathBreadcrumbbar(NonnullRefPtr<GUI::TextBox> 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();
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue