From f18ebec8e94dcb1a507a69ddf698220b36e363c9 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 30 Apr 2019 15:13:38 +0200 Subject: [PATCH] Added menu icons for a dark mode --- resources/icons/layers.svg | 8 +- resources/icons/white/add_copies.svg | 19 ++++ resources/icons/white/add_modifier.svg | 13 +++ resources/icons/white/add_part.svg | 20 ++++ resources/icons/white/advanced+wrench.svg | 43 +++++++++ resources/icons/white/advanced_plus.svg | 24 +++++ resources/icons/white/cog.svg | 17 ++++ resources/icons/white/cooling.svg | 25 +++++ resources/icons/white/copy_menu.svg | 37 ++++++++ resources/icons/white/delete.svg | 22 +++++ resources/icons/white/delete_all_menu.svg | 31 ++++++ resources/icons/white/editor_menu.svg | 20 ++++ resources/icons/white/export_config.svg | 20 ++++ .../icons/white/export_config_bundle.svg | 50 ++++++++++ resources/icons/white/export_gcode.svg | 14 +++ resources/icons/white/export_plate.svg | 15 +++ resources/icons/white/export_plater.svg | 12 +++ resources/icons/white/extruder+funnel.svg | 15 +++ resources/icons/white/flag_green.svg | 10 ++ resources/icons/white/flag_red.svg | 10 ++ resources/icons/white/import_config.svg | 25 +++++ .../icons/white/import_config_bundle.svg | 61 ++++++++++++ resources/icons/white/import_plate.svg | 38 ++++++++ resources/icons/white/import_plater.svg | 17 ++++ resources/icons/white/infill.svg | 35 +++++++ resources/icons/white/layers.svg | 27 ++++++ resources/icons/white/lock2_closed.svg | 10 ++ resources/icons/white/lock_closed.svg | 10 ++ resources/icons/white/machine+cog.svg | 30 ++++++ resources/icons/white/notes.svg | 25 +++++ resources/icons/white/number_of_copies.svg | 29 ++++++ resources/icons/white/open.svg | 11 +++ resources/icons/white/output+page_white.svg | 20 ++++ resources/icons/white/pad.svg | 83 ++++++++++++++++ resources/icons/white/paste_menu.svg | 27 ++++++ resources/icons/white/plater.svg | 12 +++ resources/icons/white/preview_menu.svg | 48 ++++++++++ resources/icons/white/printer.svg | 14 +++ resources/icons/white/re_slice.svg | 19 ++++ resources/icons/white/remove_copies.svg | 15 +++ resources/icons/white/remove_menu.svg | 44 +++++++++ resources/icons/white/resin.svg | 10 ++ resources/icons/white/save.svg | 25 +++++ resources/icons/white/set_separate_obj.svg | 29 ++++++ resources/icons/white/skirt+brim.svg | 15 +++ resources/icons/white/split_object_SMALL.svg | 19 ++++ resources/icons/white/split_parts_SMALL.svg | 18 ++++ resources/icons/white/spool.svg | 21 +++++ resources/icons/white/support.svg | 94 +++++++++++++++++++ resources/icons/white/support_blocker.svg | 48 ++++++++++ resources/icons/white/support_enforcer.svg | 19 ++++ resources/icons/white/test.svg | 37 ++++++++ resources/icons/white/time.svg | 16 ++++ resources/icons/white/upload_queue.svg | 29 ++++++ resources/icons/white/wrench.svg | 20 ++++ resources/icons/wrench_white.svg | 20 ++++ src/slic3r/GUI/MainFrame.cpp | 62 +++++++----- 57 files changed, 1477 insertions(+), 30 deletions(-) create mode 100644 resources/icons/white/add_copies.svg create mode 100644 resources/icons/white/add_modifier.svg create mode 100644 resources/icons/white/add_part.svg create mode 100644 resources/icons/white/advanced+wrench.svg create mode 100644 resources/icons/white/advanced_plus.svg create mode 100644 resources/icons/white/cog.svg create mode 100644 resources/icons/white/cooling.svg create mode 100644 resources/icons/white/copy_menu.svg create mode 100644 resources/icons/white/delete.svg create mode 100644 resources/icons/white/delete_all_menu.svg create mode 100644 resources/icons/white/editor_menu.svg create mode 100644 resources/icons/white/export_config.svg create mode 100644 resources/icons/white/export_config_bundle.svg create mode 100644 resources/icons/white/export_gcode.svg create mode 100644 resources/icons/white/export_plate.svg create mode 100644 resources/icons/white/export_plater.svg create mode 100644 resources/icons/white/extruder+funnel.svg create mode 100644 resources/icons/white/flag_green.svg create mode 100644 resources/icons/white/flag_red.svg create mode 100644 resources/icons/white/import_config.svg create mode 100644 resources/icons/white/import_config_bundle.svg create mode 100644 resources/icons/white/import_plate.svg create mode 100644 resources/icons/white/import_plater.svg create mode 100644 resources/icons/white/infill.svg create mode 100644 resources/icons/white/layers.svg create mode 100644 resources/icons/white/lock2_closed.svg create mode 100644 resources/icons/white/lock_closed.svg create mode 100644 resources/icons/white/machine+cog.svg create mode 100644 resources/icons/white/notes.svg create mode 100644 resources/icons/white/number_of_copies.svg create mode 100644 resources/icons/white/open.svg create mode 100644 resources/icons/white/output+page_white.svg create mode 100644 resources/icons/white/pad.svg create mode 100644 resources/icons/white/paste_menu.svg create mode 100644 resources/icons/white/plater.svg create mode 100644 resources/icons/white/preview_menu.svg create mode 100644 resources/icons/white/printer.svg create mode 100644 resources/icons/white/re_slice.svg create mode 100644 resources/icons/white/remove_copies.svg create mode 100644 resources/icons/white/remove_menu.svg create mode 100644 resources/icons/white/resin.svg create mode 100644 resources/icons/white/save.svg create mode 100644 resources/icons/white/set_separate_obj.svg create mode 100644 resources/icons/white/skirt+brim.svg create mode 100644 resources/icons/white/split_object_SMALL.svg create mode 100644 resources/icons/white/split_parts_SMALL.svg create mode 100644 resources/icons/white/spool.svg create mode 100644 resources/icons/white/support.svg create mode 100644 resources/icons/white/support_blocker.svg create mode 100644 resources/icons/white/support_enforcer.svg create mode 100644 resources/icons/white/test.svg create mode 100644 resources/icons/white/time.svg create mode 100644 resources/icons/white/upload_queue.svg create mode 100644 resources/icons/white/wrench.svg create mode 100644 resources/icons/wrench_white.svg diff --git a/resources/icons/layers.svg b/resources/icons/layers.svg index cd71fab3a..da5dec21d 100644 --- a/resources/icons/layers.svg +++ b/resources/icons/layers.svg @@ -5,13 +5,13 @@ - + - + - + @@ -20,7 +20,7 @@ - + diff --git a/resources/icons/white/add_copies.svg b/resources/icons/white/add_copies.svg new file mode 100644 index 000000000..17eff0179 --- /dev/null +++ b/resources/icons/white/add_copies.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/resources/icons/white/add_modifier.svg b/resources/icons/white/add_modifier.svg new file mode 100644 index 000000000..09c3ce27d --- /dev/null +++ b/resources/icons/white/add_modifier.svg @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/resources/icons/white/add_part.svg b/resources/icons/white/add_part.svg new file mode 100644 index 000000000..b7c800bbb --- /dev/null +++ b/resources/icons/white/add_part.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + diff --git a/resources/icons/white/advanced+wrench.svg b/resources/icons/white/advanced+wrench.svg new file mode 100644 index 000000000..5e878cb3c --- /dev/null +++ b/resources/icons/white/advanced+wrench.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + diff --git a/resources/icons/white/advanced_plus.svg b/resources/icons/white/advanced_plus.svg new file mode 100644 index 000000000..db532ec4b --- /dev/null +++ b/resources/icons/white/advanced_plus.svg @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/resources/icons/white/cog.svg b/resources/icons/white/cog.svg new file mode 100644 index 000000000..773e4d65d --- /dev/null +++ b/resources/icons/white/cog.svg @@ -0,0 +1,17 @@ + + + + + + + + diff --git a/resources/icons/white/cooling.svg b/resources/icons/white/cooling.svg new file mode 100644 index 000000000..29bd04c36 --- /dev/null +++ b/resources/icons/white/cooling.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/copy_menu.svg b/resources/icons/white/copy_menu.svg new file mode 100644 index 000000000..d660aab6a --- /dev/null +++ b/resources/icons/white/copy_menu.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/delete.svg b/resources/icons/white/delete.svg new file mode 100644 index 000000000..91d5ce74c --- /dev/null +++ b/resources/icons/white/delete.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/delete_all_menu.svg b/resources/icons/white/delete_all_menu.svg new file mode 100644 index 000000000..5d825c424 --- /dev/null +++ b/resources/icons/white/delete_all_menu.svg @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/editor_menu.svg b/resources/icons/white/editor_menu.svg new file mode 100644 index 000000000..649d2c40f --- /dev/null +++ b/resources/icons/white/editor_menu.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/export_config.svg b/resources/icons/white/export_config.svg new file mode 100644 index 000000000..22f8ebe1a --- /dev/null +++ b/resources/icons/white/export_config.svg @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/resources/icons/white/export_config_bundle.svg b/resources/icons/white/export_config_bundle.svg new file mode 100644 index 000000000..99bd62b6c --- /dev/null +++ b/resources/icons/white/export_config_bundle.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/export_gcode.svg b/resources/icons/white/export_gcode.svg new file mode 100644 index 000000000..39f5225cb --- /dev/null +++ b/resources/icons/white/export_gcode.svg @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/resources/icons/white/export_plate.svg b/resources/icons/white/export_plate.svg new file mode 100644 index 000000000..18159d2a8 --- /dev/null +++ b/resources/icons/white/export_plate.svg @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/resources/icons/white/export_plater.svg b/resources/icons/white/export_plater.svg new file mode 100644 index 000000000..e71b38a0a --- /dev/null +++ b/resources/icons/white/export_plater.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/resources/icons/white/extruder+funnel.svg b/resources/icons/white/extruder+funnel.svg new file mode 100644 index 000000000..de6b227da --- /dev/null +++ b/resources/icons/white/extruder+funnel.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff --git a/resources/icons/white/flag_green.svg b/resources/icons/white/flag_green.svg new file mode 100644 index 000000000..8479d0e9a --- /dev/null +++ b/resources/icons/white/flag_green.svg @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/resources/icons/white/flag_red.svg b/resources/icons/white/flag_red.svg new file mode 100644 index 000000000..a9b1cf8fe --- /dev/null +++ b/resources/icons/white/flag_red.svg @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/resources/icons/white/import_config.svg b/resources/icons/white/import_config.svg new file mode 100644 index 000000000..001277f73 --- /dev/null +++ b/resources/icons/white/import_config.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + diff --git a/resources/icons/white/import_config_bundle.svg b/resources/icons/white/import_config_bundle.svg new file mode 100644 index 000000000..c16cd7b3c --- /dev/null +++ b/resources/icons/white/import_config_bundle.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/import_plate.svg b/resources/icons/white/import_plate.svg new file mode 100644 index 000000000..7f888e3d7 --- /dev/null +++ b/resources/icons/white/import_plate.svg @@ -0,0 +1,38 @@ + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/import_plater.svg b/resources/icons/white/import_plater.svg new file mode 100644 index 000000000..1dc5aae6e --- /dev/null +++ b/resources/icons/white/import_plater.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + diff --git a/resources/icons/white/infill.svg b/resources/icons/white/infill.svg new file mode 100644 index 000000000..086043099 --- /dev/null +++ b/resources/icons/white/infill.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/layers.svg b/resources/icons/white/layers.svg new file mode 100644 index 000000000..cd71fab3a --- /dev/null +++ b/resources/icons/white/layers.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/lock2_closed.svg b/resources/icons/white/lock2_closed.svg new file mode 100644 index 000000000..726c850a1 --- /dev/null +++ b/resources/icons/white/lock2_closed.svg @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/resources/icons/white/lock_closed.svg b/resources/icons/white/lock_closed.svg new file mode 100644 index 000000000..1665dc9a0 --- /dev/null +++ b/resources/icons/white/lock_closed.svg @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/resources/icons/white/machine+cog.svg b/resources/icons/white/machine+cog.svg new file mode 100644 index 000000000..ec49265b8 --- /dev/null +++ b/resources/icons/white/machine+cog.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + diff --git a/resources/icons/white/notes.svg b/resources/icons/white/notes.svg new file mode 100644 index 000000000..25de4191e --- /dev/null +++ b/resources/icons/white/notes.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/number_of_copies.svg b/resources/icons/white/number_of_copies.svg new file mode 100644 index 000000000..7c9d78a80 --- /dev/null +++ b/resources/icons/white/number_of_copies.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/open.svg b/resources/icons/white/open.svg new file mode 100644 index 000000000..0ea9ecdb2 --- /dev/null +++ b/resources/icons/white/open.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/resources/icons/white/output+page_white.svg b/resources/icons/white/output+page_white.svg new file mode 100644 index 000000000..083874003 --- /dev/null +++ b/resources/icons/white/output+page_white.svg @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/resources/icons/white/pad.svg b/resources/icons/white/pad.svg new file mode 100644 index 000000000..cddb2da02 --- /dev/null +++ b/resources/icons/white/pad.svg @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/paste_menu.svg b/resources/icons/white/paste_menu.svg new file mode 100644 index 000000000..465c2faf0 --- /dev/null +++ b/resources/icons/white/paste_menu.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + diff --git a/resources/icons/white/plater.svg b/resources/icons/white/plater.svg new file mode 100644 index 000000000..d637a5e7e --- /dev/null +++ b/resources/icons/white/plater.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/resources/icons/white/preview_menu.svg b/resources/icons/white/preview_menu.svg new file mode 100644 index 000000000..98095359c --- /dev/null +++ b/resources/icons/white/preview_menu.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/printer.svg b/resources/icons/white/printer.svg new file mode 100644 index 000000000..d94f6fd5c --- /dev/null +++ b/resources/icons/white/printer.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + diff --git a/resources/icons/white/re_slice.svg b/resources/icons/white/re_slice.svg new file mode 100644 index 000000000..b8d7dc727 --- /dev/null +++ b/resources/icons/white/re_slice.svg @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/resources/icons/white/remove_copies.svg b/resources/icons/white/remove_copies.svg new file mode 100644 index 000000000..5b277e45e --- /dev/null +++ b/resources/icons/white/remove_copies.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff --git a/resources/icons/white/remove_menu.svg b/resources/icons/white/remove_menu.svg new file mode 100644 index 000000000..59360a33f --- /dev/null +++ b/resources/icons/white/remove_menu.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + diff --git a/resources/icons/white/resin.svg b/resources/icons/white/resin.svg new file mode 100644 index 000000000..81abfae0c --- /dev/null +++ b/resources/icons/white/resin.svg @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/resources/icons/white/save.svg b/resources/icons/white/save.svg new file mode 100644 index 000000000..3349a42dd --- /dev/null +++ b/resources/icons/white/save.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/set_separate_obj.svg b/resources/icons/white/set_separate_obj.svg new file mode 100644 index 000000000..de083c1c9 --- /dev/null +++ b/resources/icons/white/set_separate_obj.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/skirt+brim.svg b/resources/icons/white/skirt+brim.svg new file mode 100644 index 000000000..684e177d2 --- /dev/null +++ b/resources/icons/white/skirt+brim.svg @@ -0,0 +1,15 @@ + + + + + + diff --git a/resources/icons/white/split_object_SMALL.svg b/resources/icons/white/split_object_SMALL.svg new file mode 100644 index 000000000..4795cab51 --- /dev/null +++ b/resources/icons/white/split_object_SMALL.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + diff --git a/resources/icons/white/split_parts_SMALL.svg b/resources/icons/white/split_parts_SMALL.svg new file mode 100644 index 000000000..eba846c17 --- /dev/null +++ b/resources/icons/white/split_parts_SMALL.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/resources/icons/white/spool.svg b/resources/icons/white/spool.svg new file mode 100644 index 000000000..7c9fbab97 --- /dev/null +++ b/resources/icons/white/spool.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/support.svg b/resources/icons/white/support.svg new file mode 100644 index 000000000..52b7c6b40 --- /dev/null +++ b/resources/icons/white/support.svg @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/support_blocker.svg b/resources/icons/white/support_blocker.svg new file mode 100644 index 000000000..17401e2ab --- /dev/null +++ b/resources/icons/white/support_blocker.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/support_enforcer.svg b/resources/icons/white/support_enforcer.svg new file mode 100644 index 000000000..0de2dc6a7 --- /dev/null +++ b/resources/icons/white/support_enforcer.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/resources/icons/white/test.svg b/resources/icons/white/test.svg new file mode 100644 index 000000000..639bbbde8 --- /dev/null +++ b/resources/icons/white/test.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/time.svg b/resources/icons/white/time.svg new file mode 100644 index 000000000..d014286b5 --- /dev/null +++ b/resources/icons/white/time.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/resources/icons/white/upload_queue.svg b/resources/icons/white/upload_queue.svg new file mode 100644 index 000000000..710e2be89 --- /dev/null +++ b/resources/icons/white/upload_queue.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + diff --git a/resources/icons/white/wrench.svg b/resources/icons/white/wrench.svg new file mode 100644 index 000000000..714c5a82a --- /dev/null +++ b/resources/icons/white/wrench.svg @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/resources/icons/wrench_white.svg b/resources/icons/wrench_white.svg new file mode 100644 index 000000000..714c5a82a --- /dev/null +++ b/resources/icons/wrench_white.svg @@ -0,0 +1,20 @@ + + + + + + + + + diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index cbc85ef23..78d17a4f1 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -298,6 +298,16 @@ void MainFrame::on_dpi_changed(const wxRect &suggested_rect) this->Maximize(is_maximized); } +static std::string menu_icon(const std::string& icon_name) +{ +#ifdef __WXMSW__ + const std::string folder = "white\\"; +#else + const std::string folder = "white/"; +#endif + return wxGetApp().dark_mode_menus() ? folder+icon_name : icon_name; +} + void MainFrame::init_menubar() { #ifdef __APPLE__ @@ -308,41 +318,41 @@ void MainFrame::init_menubar() wxMenu* fileMenu = new wxMenu; { wxMenuItem* item_open = append_menu_item(fileMenu, wxID_ANY, _(L("&Open Project")) + dots + "\tCtrl+O", _(L("Open a project file")), - [this](wxCommandEvent&) { if (m_plater) m_plater->load_project(); }, "open"); + [this](wxCommandEvent&) { if (m_plater) m_plater->load_project(); }, menu_icon("open")); wxMenuItem* item_save = append_menu_item(fileMenu, wxID_ANY, _(L("&Save Project")) + "\tCtrl+S", _(L("Save current project file")), - [this](wxCommandEvent&) { if (m_plater) m_plater->export_3mf(into_path(m_plater->get_project_filename())); }, "save"); + [this](wxCommandEvent&) { if (m_plater) m_plater->export_3mf(into_path(m_plater->get_project_filename())); }, menu_icon("save")); wxMenuItem* item_save_as = append_menu_item(fileMenu, wxID_ANY, _(L("Save Project &as")) + dots + "\tCtrl+Alt+S", _(L("Save current project file as")), - [this](wxCommandEvent&) { if (m_plater) m_plater->export_3mf(); }, "save"); + [this](wxCommandEvent&) { if (m_plater) m_plater->export_3mf(); }, menu_icon("save")); fileMenu->AppendSeparator(); wxMenu* import_menu = new wxMenu(); wxMenuItem* item_import_model = append_menu_item(import_menu, wxID_ANY, _(L("Import STL/OBJ/AM&F/3MF")) + dots + "\tCtrl+I", _(L("Load a model")), - [this](wxCommandEvent&) { if (m_plater) m_plater->add_model(); }, "import_plater"); + [this](wxCommandEvent&) { if (m_plater) m_plater->add_model(); }, menu_icon("import_plater")); import_menu->AppendSeparator(); append_menu_item(import_menu, wxID_ANY, _(L("Import &Config")) + dots + "\tCtrl+L", _(L("Load exported configuration file")), - [this](wxCommandEvent&) { load_config_file(); }, "import_config"); + [this](wxCommandEvent&) { load_config_file(); }, menu_icon("import_config")); append_menu_item(import_menu, wxID_ANY, _(L("Import Config from &project")) + dots +"\tCtrl+Alt+L", _(L("Load configuration from project file")), - [this](wxCommandEvent&) { if (m_plater) m_plater->extract_config_from_project(); }, "import_config"); + [this](wxCommandEvent&) { if (m_plater) m_plater->extract_config_from_project(); }, menu_icon("import_config")); import_menu->AppendSeparator(); append_menu_item(import_menu, wxID_ANY, _(L("Import Config &Bundle")) + dots, _(L("Load presets from a bundle")), - [this](wxCommandEvent&) { load_configbundle(); }, "import_config_bundle"); + [this](wxCommandEvent&) { load_configbundle(); }, menu_icon("import_config_bundle")); append_submenu(fileMenu, import_menu, wxID_ANY, _(L("&Import")), ""); wxMenu* export_menu = new wxMenu(); wxMenuItem* item_export_gcode = append_menu_item(export_menu, wxID_ANY, _(L("Export &G-code")) + dots +"\tCtrl+G", _(L("Export current plate as G-code")), - [this](wxCommandEvent&) { if (m_plater) m_plater->export_gcode(); }, "export_gcode"); + [this](wxCommandEvent&) { if (m_plater) m_plater->export_gcode(); }, menu_icon("export_gcode")); m_changeable_menu_items.push_back(item_export_gcode); export_menu->AppendSeparator(); wxMenuItem* item_export_stl = append_menu_item(export_menu, wxID_ANY, _(L("Export plate as &STL")) + dots, _(L("Export current plate as STL")), - [this](wxCommandEvent&) { if (m_plater) m_plater->export_stl(); }, "export_plater"); + [this](wxCommandEvent&) { if (m_plater) m_plater->export_stl(); }, menu_icon("export_plater")); wxMenuItem* item_export_amf = append_menu_item(export_menu, wxID_ANY, _(L("Export plate as &AMF")) + dots, _(L("Export current plate as AMF")), - [this](wxCommandEvent&) { if (m_plater) m_plater->export_amf(); }, "export_plater"); + [this](wxCommandEvent&) { if (m_plater) m_plater->export_amf(); }, menu_icon("export_plater")); export_menu->AppendSeparator(); append_menu_item(export_menu, wxID_ANY, _(L("Export &Config")) +dots +"\tCtrl+E", _(L("Export current configuration to file")), - [this](wxCommandEvent&) { export_config(); }, "export_config"); + [this](wxCommandEvent&) { export_config(); }, menu_icon("export_config")); append_menu_item(export_menu, wxID_ANY, _(L("Export Config &Bundle")) + dots, _(L("Export all presets to file")), - [this](wxCommandEvent&) { export_configbundle(); }, "export_config_bundle"); + [this](wxCommandEvent&) { export_configbundle(); }, menu_icon("export_config_bundle")); append_submenu(fileMenu, export_menu, wxID_ANY, _(L("&Export")), ""); fileMenu->AppendSeparator(); @@ -370,10 +380,10 @@ void MainFrame::init_menubar() fileMenu->AppendSeparator(); #endif m_menu_item_reslice_now = append_menu_item(fileMenu, wxID_ANY, _(L("(Re)Slice &Now")) + "\tCtrl+R", _(L("Start new slicing process")), - [this](wxCommandEvent&) { reslice_now(); }, "re_slice"); + [this](wxCommandEvent&) { reslice_now(); }, menu_icon("re_slice")); fileMenu->AppendSeparator(); append_menu_item(fileMenu, wxID_ANY, _(L("&Repair STL file")) + dots, _(L("Automatically repair an STL file")), - [this](wxCommandEvent&) { repair_stl(); }, "wrench"); + [this](wxCommandEvent&) { repair_stl(); }, menu_icon("wrench")); fileMenu->AppendSeparator(); append_menu_item(fileMenu, wxID_EXIT, _(L("&Quit")), wxString::Format(_(L("Quit %s")), SLIC3R_APP_NAME), [this](wxCommandEvent&) { Close(false); }); @@ -413,16 +423,16 @@ void MainFrame::init_menubar() [this](wxCommandEvent&) { m_plater->select_all(); }, ""); editMenu->AppendSeparator(); wxMenuItem* item_delete_sel = append_menu_item(editMenu, wxID_ANY, _(L("&Delete selected")) + sep + hotkey_delete, _(L("Deletes the current selection")), - [this](wxCommandEvent&) { m_plater->remove_selected(); }, "remove_menu"); + [this](wxCommandEvent&) { m_plater->remove_selected(); }, menu_icon("remove_menu")); wxMenuItem* item_delete_all = append_menu_item(editMenu, wxID_ANY, _(L("Delete &all")) + sep + GUI::shortkey_ctrl_prefix() + sep_space + hotkey_delete, _(L("Deletes all objects")), - [this](wxCommandEvent&) { m_plater->reset(); }, "delete_all_menu"); + [this](wxCommandEvent&) { m_plater->reset(); }, menu_icon("delete_all_menu")); editMenu->AppendSeparator(); wxMenuItem* item_copy = append_menu_item(editMenu, wxID_ANY, _(L("&Copy")) + sep + GUI::shortkey_ctrl_prefix() + sep_space + "C", _(L("Copy selection to clipboard")), - [this](wxCommandEvent&) { m_plater->copy_selection_to_clipboard(); }, "copy_menu"); + [this](wxCommandEvent&) { m_plater->copy_selection_to_clipboard(); }, menu_icon("copy_menu")); wxMenuItem* item_paste = append_menu_item(editMenu, wxID_ANY, _(L("&Paste")) + sep + GUI::shortkey_ctrl_prefix() + sep_space + "V", _(L("Paste clipboard")), - [this](wxCommandEvent&) { m_plater->paste_from_clipboard(); }, "paste_menu"); + [this](wxCommandEvent&) { m_plater->paste_from_clipboard(); }, menu_icon("paste_menu")); Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Enable(can_select()); }, item_select_all->GetId()); Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Enable(can_delete()); }, item_delete_sel->GetId()); @@ -437,25 +447,25 @@ void MainFrame::init_menubar() size_t tab_offset = 0; if (m_plater) { append_menu_item(windowMenu, wxID_HIGHEST + 1, _(L("&Plater Tab")) + "\tCtrl+1", _(L("Show the plater")), - [this](wxCommandEvent&) { select_tab(0); }, "plater"); + [this](wxCommandEvent&) { select_tab(0); }, menu_icon("plater")); tab_offset += 1; } if (tab_offset > 0) { windowMenu->AppendSeparator(); } append_menu_item(windowMenu, wxID_HIGHEST + 2, _(L("P&rint Settings Tab")) + "\tCtrl+2", _(L("Show the print settings")), - [this, tab_offset](wxCommandEvent&) { select_tab(tab_offset + 0); }, "cog"); + [this, tab_offset](wxCommandEvent&) { select_tab(tab_offset + 0); }, menu_icon("cog")); wxMenuItem* item_material_tab = append_menu_item(windowMenu, wxID_HIGHEST + 3, _(L("&Filament Settings Tab")) + "\tCtrl+3", _(L("Show the filament settings")), - [this, tab_offset](wxCommandEvent&) { select_tab(tab_offset + 1); }, "spool"); + [this, tab_offset](wxCommandEvent&) { select_tab(tab_offset + 1); }, menu_icon("spool")); m_changeable_menu_items.push_back(item_material_tab); append_menu_item(windowMenu, wxID_HIGHEST + 4, _(L("Print&er Settings Tab")) + "\tCtrl+4", _(L("Show the printer settings")), - [this, tab_offset](wxCommandEvent&) { select_tab(tab_offset + 2); }, "printer"); + [this, tab_offset](wxCommandEvent&) { select_tab(tab_offset + 2); }, menu_icon("printer")); if (m_plater) { windowMenu->AppendSeparator(); wxMenuItem* item_3d = append_menu_item(windowMenu, wxID_HIGHEST + 5, _(L("3&D")) + "\tCtrl+5", _(L("Show the 3D editing view")), - [this](wxCommandEvent&) { m_plater->select_view_3D("3D"); }, "editor_menu"); + [this](wxCommandEvent&) { m_plater->select_view_3D("3D"); }, menu_icon("editor_menu")); wxMenuItem* item_preview = append_menu_item(windowMenu, wxID_HIGHEST + 6, _(L("Pre&view")) + "\tCtrl+6", _(L("Show the 3D slices preview")), - [this](wxCommandEvent&) { m_plater->select_view_3D("Preview"); }, "preview_menu"); + [this](wxCommandEvent&) { m_plater->select_view_3D("Preview"); }, menu_icon("preview_menu")); Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Enable(can_change_view()); }, item_3d->GetId()); Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Enable(can_change_view()); }, item_preview->GetId()); @@ -476,7 +486,7 @@ void MainFrame::init_menubar() windowMenu->AppendSeparator(); append_menu_item(windowMenu, wxID_ANY, _(L("Print &Host Upload Queue")) + "\tCtrl+J", _(L("Display the Print Host Upload Queue window")), - [this](wxCommandEvent&) { m_printhost_queue_dlg->Show(); }, "upload_queue"); + [this](wxCommandEvent&) { m_printhost_queue_dlg->Show(); }, menu_icon("upload_queue")); } // View menu @@ -568,7 +578,7 @@ void MainFrame::update_menubar() m_changeable_menu_items[miExport] ->SetItemLabel((is_fff ? _(L("Export &G-code")) : _(L("Export")) ) + dots + "\tCtrl+G"); m_changeable_menu_items[miMaterialTab] ->SetItemLabel((is_fff ? _(L("&Filament Settings Tab")) : _(L("Mate&rial Settings Tab"))) + "\tCtrl+3"); - m_changeable_menu_items[miMaterialTab] ->SetBitmap(create_scaled_bitmap(this, is_fff ? "spool": "resin")); + m_changeable_menu_items[miMaterialTab] ->SetBitmap(create_scaled_bitmap(this, menu_icon(is_fff ? "spool": "resin"))); } // To perform the "Quck Slice", "Quick Slice and Save As", "Repeat last Quick Slice" and "Slice to SVG".