mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:17:44 +00:00
Spreadsheet: Move down a cell when Return is pressed in the cell editor
If Return key is pressed when using cell value editor in a top bar, cursor is automatically moved one line down. Fixes #8287.
This commit is contained in:
parent
cf91815654
commit
f6cca0b8f0
1 changed files with 4 additions and 0 deletions
|
@ -53,6 +53,10 @@ SpreadsheetWidget::SpreadsheetWidget(NonnullRefPtrVector<Sheet>&& sheets, bool s
|
||||||
cell_value_editor.set_font(Gfx::FontDatabase::default_fixed_width_font());
|
cell_value_editor.set_font(Gfx::FontDatabase::default_fixed_width_font());
|
||||||
cell_value_editor.set_scrollbars_enabled(false);
|
cell_value_editor.set_scrollbars_enabled(false);
|
||||||
|
|
||||||
|
cell_value_editor.on_return_pressed = [this]() {
|
||||||
|
m_selected_view->move_cursor(GUI::AbstractView::CursorMovement::Down);
|
||||||
|
};
|
||||||
|
|
||||||
cell_value_editor.set_syntax_highlighter(make<CellSyntaxHighlighter>());
|
cell_value_editor.set_syntax_highlighter(make<CellSyntaxHighlighter>());
|
||||||
cell_value_editor.set_enabled(false);
|
cell_value_editor.set_enabled(false);
|
||||||
current_cell_label.set_enabled(false);
|
current_cell_label.set_enabled(false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue