mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
LibGUI: Allow double clicking on tabwidgets
This commit is contained in:
parent
5ca242ce30
commit
0cfe446d3f
2 changed files with 14 additions and 0 deletions
|
@ -635,6 +635,18 @@ void TabWidget::context_menu_event(ContextMenuEvent& context_menu_event)
|
|||
}
|
||||
}
|
||||
|
||||
void TabWidget::doubleclick_event(MouseEvent&)
|
||||
{
|
||||
for (auto& tab : m_tabs) {
|
||||
if (auto* widget = tab.widget) {
|
||||
deferred_invoke([this, widget] {
|
||||
if (on_double_click)
|
||||
on_double_click(*widget);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TabWidget::set_container_margins(GUI::Margins const& margins)
|
||||
{
|
||||
m_container_margins = margins;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue