1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:37:37 +00:00

LibGUI+TextEditor: Allow cursor line highlighting to be toggled

This commit is contained in:
thankyouverycool 2021-09-11 11:08:01 -04:00 committed by Andreas Kling
parent a5ff941c86
commit 9a5a9fbee0
4 changed files with 23 additions and 1 deletions

View file

@ -526,6 +526,15 @@ void MainWidget::initialize_menubar(GUI::Window& window)
view_menu.add_action(*m_visualize_trailing_whitespace_action);
view_menu.add_action(*m_visualize_leading_whitespace_action);
m_cursor_line_highlighting_action = GUI::Action::create_checkable("Line High&lighting", [&](auto&) {
m_editor->set_cursor_line_highlighting(m_cursor_line_highlighting_action->is_checked());
});
m_cursor_line_highlighting_action->set_checked(true);
m_cursor_line_highlighting_action->set_status_tip("Highlight text on the cursor's line");
view_menu.add_action(*m_cursor_line_highlighting_action);
view_menu.add_separator();
view_menu.add_action(*m_no_preview_action);
view_menu.add_action(*m_markdown_preview_action);