From 50f8f45e0a907ae722c2293928127470edbf0bef Mon Sep 17 00:00:00 2001 From: YuSanka Date: Fri, 12 Apr 2019 12:08:52 +0200 Subject: [PATCH] Added new icons --- resources/icons/add_copies.svg | 19 ++++++++++ resources/icons/add_modifier.svg | 13 +++++++ resources/icons/add_part.svg | 19 ++++++++++ resources/icons/advanced_plus.svg | 24 ++++++++++++ resources/icons/delete.svg | 22 +++++++++++ resources/icons/layers.svg | 8 ++-- resources/icons/number_of_copies.svg | 28 ++++++++++++++ resources/icons/open.svg | 11 ++++++ resources/icons/plater.svg | 12 ++++++ resources/icons/re_slice.svg | 19 ++++++++++ resources/icons/remove_copies.svg | 15 ++++++++ resources/icons/split_parts_SMALL.svg | 18 +++++++++ resources/icons/support_blocker.svg | 48 ++++++++++++++++++++++++ resources/icons/support_enforcer.svg | 19 ++++++++++ resources/icons/upload_queue.svg | 29 +++++++++++++++ resources/icons/wrench.svg | 53 ++++++++++++++++++--------- src/slic3r/GUI/GUI_ObjectList.cpp | 10 ++--- src/slic3r/GUI/MainFrame.cpp | 10 ++--- src/slic3r/GUI/Plater.cpp | 21 +++++------ src/slic3r/GUI/Tab.cpp | 4 +- src/slic3r/GUI/wxExtensions.cpp | 2 +- 21 files changed, 359 insertions(+), 45 deletions(-) create mode 100644 resources/icons/add_copies.svg create mode 100644 resources/icons/add_modifier.svg create mode 100644 resources/icons/add_part.svg create mode 100644 resources/icons/advanced_plus.svg create mode 100644 resources/icons/delete.svg create mode 100644 resources/icons/number_of_copies.svg create mode 100644 resources/icons/open.svg create mode 100644 resources/icons/plater.svg create mode 100644 resources/icons/re_slice.svg create mode 100644 resources/icons/remove_copies.svg create mode 100644 resources/icons/split_parts_SMALL.svg create mode 100644 resources/icons/support_blocker.svg create mode 100644 resources/icons/support_enforcer.svg create mode 100644 resources/icons/upload_queue.svg diff --git a/resources/icons/add_copies.svg b/resources/icons/add_copies.svg new file mode 100644 index 000000000..45b1d27cf --- /dev/null +++ b/resources/icons/add_copies.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + diff --git a/resources/icons/add_modifier.svg b/resources/icons/add_modifier.svg new file mode 100644 index 000000000..c3cfaabbb --- /dev/null +++ b/resources/icons/add_modifier.svg @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/resources/icons/add_part.svg b/resources/icons/add_part.svg new file mode 100644 index 000000000..5f0afdcc3 --- /dev/null +++ b/resources/icons/add_part.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + diff --git a/resources/icons/advanced_plus.svg b/resources/icons/advanced_plus.svg new file mode 100644 index 000000000..48c4e08db --- /dev/null +++ b/resources/icons/advanced_plus.svg @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/resources/icons/delete.svg b/resources/icons/delete.svg new file mode 100644 index 000000000..f0976a76b --- /dev/null +++ b/resources/icons/delete.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + 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/number_of_copies.svg b/resources/icons/number_of_copies.svg new file mode 100644 index 000000000..a5c8affc7 --- /dev/null +++ b/resources/icons/number_of_copies.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/open.svg b/resources/icons/open.svg new file mode 100644 index 000000000..8fcddc2a6 --- /dev/null +++ b/resources/icons/open.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/resources/icons/plater.svg b/resources/icons/plater.svg new file mode 100644 index 000000000..6fd21215b --- /dev/null +++ b/resources/icons/plater.svg @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/resources/icons/re_slice.svg b/resources/icons/re_slice.svg new file mode 100644 index 000000000..54490ea42 --- /dev/null +++ b/resources/icons/re_slice.svg @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/resources/icons/remove_copies.svg b/resources/icons/remove_copies.svg new file mode 100644 index 000000000..d249cb5bc --- /dev/null +++ b/resources/icons/remove_copies.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff --git a/resources/icons/split_parts_SMALL.svg b/resources/icons/split_parts_SMALL.svg new file mode 100644 index 000000000..45f90bee0 --- /dev/null +++ b/resources/icons/split_parts_SMALL.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/resources/icons/support_blocker.svg b/resources/icons/support_blocker.svg new file mode 100644 index 000000000..56086b279 --- /dev/null +++ b/resources/icons/support_blocker.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/support_enforcer.svg b/resources/icons/support_enforcer.svg new file mode 100644 index 000000000..0f0eb4907 --- /dev/null +++ b/resources/icons/support_enforcer.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/resources/icons/upload_queue.svg b/resources/icons/upload_queue.svg new file mode 100644 index 000000000..764717836 --- /dev/null +++ b/resources/icons/upload_queue.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + diff --git a/resources/icons/wrench.svg b/resources/icons/wrench.svg index 7966da8d8..5266ec1eb 100644 --- a/resources/icons/wrench.svg +++ b/resources/icons/wrench.svg @@ -3,22 +3,41 @@ - - - - - - + + + + + + + + + diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index dc3909351..d3003b2a2 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -392,10 +392,10 @@ void ObjectList::update_name_in_model(const wxDataViewItem& item) const void ObjectList::init_icons() { - m_bmp_modifiermesh = create_scaled_bitmap(this, "lambda.png"); - m_bmp_solidmesh = create_scaled_bitmap(this, "object.png"); - m_bmp_support_enforcer = create_scaled_bitmap(this, "support_enforcer_.png"); - m_bmp_support_blocker = create_scaled_bitmap(this, "support_blocker_.png"); + m_bmp_modifiermesh = create_scaled_bitmap(this, "add_modifier"); + m_bmp_solidmesh = create_scaled_bitmap(this, "add_part"); + m_bmp_support_enforcer = create_scaled_bitmap(this, "support_enforcer"); + m_bmp_support_blocker = create_scaled_bitmap(this, "support_blocker"); m_bmp_vector.reserve(4); // bitmaps for different types of parts @@ -409,7 +409,7 @@ void ObjectList::init_icons() m_bmp_manifold_warning = create_scaled_bitmap(this, "exclamation_mark_.png"); // init bitmap for "Split to sub-objects" context menu - m_bmp_split = create_scaled_bitmap(this, "split_parts"); + m_bmp_split = create_scaled_bitmap(this, "split_parts_SMALL"); // init bitmap for "Add Settings" context menu m_bmp_cog = create_scaled_bitmap(this, "cog"); diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index b68027178..87145511c 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -271,7 +271,7 @@ 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(); }, "brick_add.png"); + [this](wxCommandEvent&) { if (m_plater) m_plater->load_project(); }, "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"); wxMenuItem* item_save_as = append_menu_item(fileMenu, wxID_ANY, _(L("Save Project &as")) + dots + "\tCtrl+Alt+S", _(L("Save current project file as")), @@ -332,10 +332,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(); }, "shape_handles.png"); + [this](wxCommandEvent&) { reslice_now(); }, "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.png"); + [this](wxCommandEvent&) { repair_stl(); }, "wrench"); fileMenu->AppendSeparator(); append_menu_item(fileMenu, wxID_EXIT, _(L("&Quit")), _(L("Quit Slic3r")), [this](wxCommandEvent&) { Close(false); }); @@ -390,7 +390,7 @@ 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); }, "application_view_tile.png"); + [this](wxCommandEvent&) { select_tab(0); }, "plater"); tab_offset += 1; } if (tab_offset > 0) { @@ -428,7 +428,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(); }, "arrow_up.png"); + [this](wxCommandEvent&) { m_printhost_queue_dlg->Show(); }, "upload_queue"); } // View menu diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 5d7436250..960d90801 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -143,8 +143,7 @@ ObjectInfo::ObjectInfo(wxWindow *parent) : info_manifold_text->SetFont(wxGetApp().small_font()); info_manifold = new wxStaticText(parent, wxID_ANY, ""); info_manifold->SetFont(wxGetApp().small_font()); - wxBitmap bitmap(GUI::from_u8(Slic3r::var("error.png")), wxBITMAP_TYPE_PNG); - manifold_warning_icon = new wxStaticBitmap(parent, wxID_ANY, bitmap); + manifold_warning_icon = new wxStaticBitmap(parent, wxID_ANY, create_scaled_bitmap(parent, "exclamation_mark_.png")/*bitmap*/); auto *sizer_manifold = new wxBoxSizer(wxHORIZONTAL); sizer_manifold->Add(info_manifold_text, 0); sizer_manifold->Add(manifold_warning_icon, 0, wxLEFT, 2); @@ -2820,17 +2819,17 @@ bool Plater::priv::init_common_menu(wxMenu* menu, const bool is_part/* = false*/ wxMenuItem* item_delete = nullptr; if (is_part) { item_delete = append_menu_item(menu, wxID_ANY, _(L("Delete")) + "\tDel", _(L("Remove the selected object")), - [this](wxCommandEvent&) { q->remove_selected(); }, "remove"); + [this](wxCommandEvent&) { q->remove_selected(); }, "delete"); sidebar->obj_list()->append_menu_item_export_stl(menu); } else { wxMenuItem* item_increase = append_menu_item(menu, wxID_ANY, _(L("Increase copies")) + "\t+", _(L("Place one more copy of the selected object")), - [this](wxCommandEvent&) { q->increase_instances(); }, "instance_add"); + [this](wxCommandEvent&) { q->increase_instances(); }, "add_copies"); wxMenuItem* item_decrease = append_menu_item(menu, wxID_ANY, _(L("Decrease copies")) + "\t-", _(L("Remove one copy of the selected object")), - [this](wxCommandEvent&) { q->decrease_instances(); }, "instance_remove"); + [this](wxCommandEvent&) { q->decrease_instances(); }, "remove_copies"); wxMenuItem* item_set_number_of_copies = append_menu_item(menu, wxID_ANY, _(L("Set number of copies")) + dots, _(L("Change the number of copies of the selected object")), - [this](wxCommandEvent&) { q->set_number_of_copies(); }, "textfield.png"); + [this](wxCommandEvent&) { q->set_number_of_copies(); }, "number_of_copies"); items_increase.push_back(item_increase); items_decrease.push_back(item_decrease); @@ -2838,7 +2837,7 @@ bool Plater::priv::init_common_menu(wxMenu* menu, const bool is_part/* = false*/ // Delete menu was moved to be after +/- instace to make it more difficult to be selected by mistake. item_delete = append_menu_item(menu, wxID_ANY, _(L("Delete")) + "\tDel", _(L("Remove the selected object")), - [this](wxCommandEvent&) { q->remove_selected(); }, "remove"); + [this](wxCommandEvent&) { q->remove_selected(); }, "delete"); menu->AppendSeparator(); wxMenuItem* item_instance_to_object = sidebar->obj_list()->append_menu_item_instance_to_object(menu); @@ -2893,9 +2892,9 @@ bool Plater::priv::complit_init_object_menu() return false; wxMenuItem* item_split_objects = append_menu_item(split_menu, wxID_ANY, _(L("To objects")), _(L("Split the selected object into individual objects")), - [this](wxCommandEvent&) { split_object(); }, "split_objects.png", &object_menu); + [this](wxCommandEvent&) { split_object(); }, "split_objects", &object_menu); wxMenuItem* item_split_volumes = append_menu_item(split_menu, wxID_ANY, _(L("To parts")), _(L("Split the selected object into individual sub-parts")), - [this](wxCommandEvent&) { split_volume(); }, "split_parts.png", &object_menu); + [this](wxCommandEvent&) { split_volume(); }, "split_parts_SMALL", &object_menu); wxMenuItem* item_split = append_submenu(&object_menu, split_menu, wxID_ANY, _(L("Split")), _(L("Split the selected object"))/*, "shape_ungroup.png"*/); object_menu.AppendSeparator(); @@ -2915,7 +2914,7 @@ bool Plater::priv::complit_init_object_menu() bool Plater::priv::complit_init_sla_object_menu() { wxMenuItem* item_split = append_menu_item(&sla_object_menu, wxID_ANY, _(L("Split")), _(L("Split the selected object into individual objects")), - [this](wxCommandEvent&) { split_object(); }, "shape_ungroup_o.png"); + [this](wxCommandEvent&) { split_object(); }, "split_objects"); sla_object_menu.AppendSeparator(); @@ -2935,7 +2934,7 @@ bool Plater::priv::complit_init_sla_object_menu() bool Plater::priv::complit_init_part_menu() { wxMenuItem* item_split = append_menu_item(&part_menu, wxID_ANY, _(L("Split")), _(L("Split the selected object into individual sub-parts")), - [this](wxCommandEvent&) { split_volume(); }, "shape_ungroup_p.png"); + [this](wxCommandEvent&) { split_volume(); }, "split_parts_SMALL"); part_menu.AppendSeparator(); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 30e3bfe89..6457de165 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1090,7 +1090,7 @@ void TabPrint::build() optgroup = page->new_optgroup(_(L("Advanced"))); optgroup->append_single_option_line("interface_shells"); - page = add_options_page(_(L("Advanced")), "wrench.png"); + page = add_options_page(_(L("Advanced")), "wrench"); optgroup = page->new_optgroup(_(L("Extrusion width"))); optgroup->append_single_option_line("extrusion_width"); optgroup->append_single_option_line("first_layer_extrusion_width"); @@ -1463,7 +1463,7 @@ void TabFilament::build() optgroup->append_single_option_line("slowdown_below_layer_time"); optgroup->append_single_option_line("min_print_speed"); - page = add_options_page(_(L("Advanced")), "wrench.png"); + page = add_options_page(_(L("Advanced")), "wrench"); optgroup = page->new_optgroup(_(L("Filament properties"))); optgroup->append_single_option_line("filament_type"); optgroup->append_single_option_line("filament_soluble"); diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp index 7f5b5ad9c..768360482 100644 --- a/src/slic3r/GUI/wxExtensions.cpp +++ b/src/slic3r/GUI/wxExtensions.cpp @@ -461,7 +461,7 @@ wxBitmap create_scaled_bitmap(wxWindow *win, const std::string& bmp_name_in, con // ---------------------------------------------------------------------------- void PrusaObjectDataViewModelNode::set_object_action_icon() { - m_action_icon = create_scaled_bitmap(nullptr, "add_object.png"); // FIXME: pass window ptr + m_action_icon = create_scaled_bitmap(nullptr, "advanced_plus"); // FIXME: pass window ptr } void PrusaObjectDataViewModelNode::set_part_action_icon() { m_action_icon = create_scaled_bitmap(nullptr, m_type == itVolume ? "cog.png" : "brick_go.png"); // FIXME: pass window ptr