mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-16 05:51:55 +00:00
LibGUI: Add GWidget::doubleclick_event().
Now double-clicking an item in a GTableView or GItemView will activate it.
This commit is contained in:
parent
43f9027968
commit
20f7d7ec67
Notes:
sideshowbarker
2024-07-19 14:57:06 +09:00
Author: https://github.com/awesomekling
Commit: 20f7d7ec67
11 changed files with 100 additions and 7 deletions
|
@ -292,3 +292,13 @@ void GTableView::set_column_hidden(int column, bool hidden)
|
|||
}
|
||||
m_column_visibility[column] = !hidden;
|
||||
}
|
||||
|
||||
void GTableView::doubleclick_event(GMouseEvent& event)
|
||||
{
|
||||
if (!model())
|
||||
return;
|
||||
if (event.button() == GMouseButton::Left) {
|
||||
mousedown_event(event);
|
||||
model()->activate(model()->selected_index());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue