1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

LibGUI: Move keyboard item activation up to AbstractView

All views want the same behavior, so move this to the base class. :^)
This commit is contained in:
Andreas Kling 2020-09-24 21:35:47 +02:00
parent d8553a6406
commit d3adbed231
8 changed files with 9 additions and 40 deletions

View file

@ -315,19 +315,6 @@ void ColumnsView::move_cursor(CursorMovement movement, SelectionUpdate selection
set_cursor(new_index, selection_update);
}
void ColumnsView::keydown_event(KeyEvent& event)
{
if (!model())
return;
if (event.key() == KeyCode::Key_Return) {
activate_selected();
return;
}
AbstractView::keydown_event(event);
}
Gfx::IntRect ColumnsView::content_rect(const ModelIndex& index) const
{
if (!index.is_valid())