mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 18:35:09 +00:00
FontEditor: Add a "Save" menu item
This commit is contained in:
parent
315dc8d81b
commit
97aaf95265
1 changed files with 4 additions and 0 deletions
|
@ -105,6 +105,10 @@ int main(int argc, char** argv)
|
|||
|
||||
set_edited_font(open_path.value(), move(new_font), window->position());
|
||||
}));
|
||||
app_menu.add_action(GUI::Action::create("Save", { Mod_Ctrl, Key_S }, Gfx::Bitmap::load_from_file("/res/icons/16x16/save.png"), [&](auto&) {
|
||||
FontEditorWidget* editor = static_cast<FontEditorWidget*>(window->main_widget());
|
||||
editor->save_as(editor->path());
|
||||
}));
|
||||
app_menu.add_action(GUI::Action::create("Save as...", { Mod_Ctrl | Mod_Shift, Key_S }, Gfx::Bitmap::load_from_file("/res/icons/16x16/save.png"), [&](auto&) {
|
||||
FontEditorWidget* editor = static_cast<FontEditorWidget*>(window->main_widget());
|
||||
Optional<String> save_path = GUI::FilePicker::get_save_filepath(editor->path(), ".font");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue