mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:38:11 +00:00
TextEditor: Move line wrapping setting to a new "View" menu
This commit is contained in:
parent
8ea25ca3b0
commit
b6de723eb3
1 changed files with 5 additions and 3 deletions
|
@ -158,15 +158,12 @@ TextEditorWidget::TextEditorWidget()
|
||||||
app_menu->add_action(*m_save_action);
|
app_menu->add_action(*m_save_action);
|
||||||
app_menu->add_action(*m_save_as_action);
|
app_menu->add_action(*m_save_as_action);
|
||||||
app_menu->add_separator();
|
app_menu->add_separator();
|
||||||
app_menu->add_action(*m_line_wrapping_setting_action);
|
|
||||||
app_menu->add_separator();
|
|
||||||
app_menu->add_action(GAction::create("Quit", { Mod_Alt, Key_F4 }, [](const GAction&) {
|
app_menu->add_action(GAction::create("Quit", { Mod_Alt, Key_F4 }, [](const GAction&) {
|
||||||
GApplication::the().quit(0);
|
GApplication::the().quit(0);
|
||||||
return;
|
return;
|
||||||
}));
|
}));
|
||||||
menubar->add_menu(move(app_menu));
|
menubar->add_menu(move(app_menu));
|
||||||
|
|
||||||
|
|
||||||
auto edit_menu = make<GMenu>("Edit");
|
auto edit_menu = make<GMenu>("Edit");
|
||||||
edit_menu->add_action(m_editor->undo_action());
|
edit_menu->add_action(m_editor->undo_action());
|
||||||
edit_menu->add_action(m_editor->redo_action());
|
edit_menu->add_action(m_editor->redo_action());
|
||||||
|
@ -190,6 +187,11 @@ TextEditorWidget::TextEditorWidget()
|
||||||
});
|
});
|
||||||
menubar->add_menu(move(font_menu));
|
menubar->add_menu(move(font_menu));
|
||||||
|
|
||||||
|
|
||||||
|
auto view_menu = make<GMenu>("View");
|
||||||
|
view_menu->add_action(*m_line_wrapping_setting_action);
|
||||||
|
menubar->add_menu(move(view_menu));
|
||||||
|
|
||||||
auto help_menu = make<GMenu>("Help");
|
auto help_menu = make<GMenu>("Help");
|
||||||
help_menu->add_action(GAction::create("About", [](const GAction&) {
|
help_menu->add_action(GAction::create("About", [](const GAction&) {
|
||||||
dbgprintf("FIXME: Implement Help/About\n");
|
dbgprintf("FIXME: Implement Help/About\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue