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

Spreadsheet: Make Return move the cursor one step down

This seems to be a common behavior in spreadsheet applications,
so let's replicate it here by hooking the activation signal.
This commit is contained in:
Andreas Kling 2020-08-28 21:03:09 +02:00
parent 70d3dd5b87
commit cd930e0f3d

View file

@ -102,6 +102,10 @@ SpreadsheetView::SpreadsheetView(Sheet& sheet)
m_table_view->update();
};
};
m_table_view->on_activation = [this](auto&) {
m_table_view->move_cursor(GUI::AbstractView::CursorMovement::Down, GUI::AbstractView::SelectionUpdate::Set);
};
}
void SpreadsheetView::hide_event(GUI::HideEvent&)