From b92ad8b784c336bd182e55eb4990c449b243af88 Mon Sep 17 00:00:00 2001 From: QIDI TECH <893239786@qq.com> Date: Fri, 29 Dec 2023 19:33:09 +0800 Subject: [PATCH] fix bug --- src/slic3r/GUI/GLCanvas3D.cpp | 13 +++++++------ src/slic3r/GUI/Plater.cpp | 7 ++++--- src/slic3r/GUI/Tab.cpp | 10 +--------- src/slic3r/GUI/Tab.hpp | 2 -- 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index d9a39ed..1c16da6 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -4913,9 +4913,8 @@ void GLCanvas3D::_render_thumbnail_internal(ThumbnailData& thumbnail_data, const const ModelObjectPtrs &model_objects = GUI::wxGetApp().model().objects; std::vector extruders_colors = get_extruders_colors(); - +//Y18 if (thumbnail_params.transparent_background) - //Y18 glsafe(::glClearColor(1.0f, 1.0f, 1.0f, 1.0f)); glsafe(::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)); @@ -4947,7 +4946,9 @@ void GLCanvas3D::_render_thumbnail_internal(ThumbnailData& thumbnail_data, const } else { shader->set_uniform("emission_factor", 0.0f); - vol->model.set_color((vol->printable && !vol->is_outside) ? vol->color : ColorRGBA::GRAY()); +//Y18 + vol->model.set_color((vol->printable && !vol->is_outside) ? ColorRGBA { 0.2f, 0.6f, 1.0f, 1.0f } : ColorRGBA::GRAY()); + //vol->model.set_color((vol->printable && !vol->is_outside) ? vol->color : ColorRGBA::GRAY()); } // the volume may have been deactivated by an active gizmo const bool is_active = vol->is_active; @@ -4979,9 +4980,9 @@ void GLCanvas3D::_render_thumbnail_internal(ThumbnailData& thumbnail_data, const vol->is_active = is_active; } glsafe(::glDisable(GL_DEPTH_TEST)); - - if (thumbnail_params.show_bed) - _render_bed(view_matrix, projection_matrix, !camera.is_looking_downward()); +//Y18 +// if (thumbnail_params.show_bed) +// _render_bed(view_matrix, projection_matrix, !camera.is_looking_downward()); // restore background color if (thumbnail_params.transparent_background) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 47a8ab9..09af81d 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -921,7 +921,8 @@ Sidebar::Sidebar(Plater *parent) int bmp_px_cnt = 32; #endif //__APPLE__ ScalableBitmap bmp = ScalableBitmap(this, icon_name, bmp_px_cnt); - *btn = new ScalableButton(this, wxID_ANY, bmp, "", wxBU_EXACTFIT); + *btn = new ScalableButton(this, wxID_ANY, bmp, label, wxBU_EXACTFIT); + (*btn)->SetFont(wxGetApp().bold_font()); wxGetApp().SetWindowVariantForButton((*btn)); #ifdef _WIN32 @@ -939,9 +940,9 @@ Sidebar::Sidebar(Plater *parent) (*btn)->Hide(); }; - init_scalable_btn(&p->btn_send_gcode , "export_gcode", _L("Send to printer") + " " +GUI::shortkey_ctrl_prefix() + "Shift+G"); + init_scalable_btn(&p->btn_send_gcode, "export_gcode", _L("Send to printer"), _L("Send to printer") + " " + GUI::shortkey_ctrl_prefix() + "Shift+G"); // init_scalable_btn(&p->btn_eject_device, "eject_sd" , _L("Remove device ") + GUI::shortkey_ctrl_prefix() + "T"); - init_scalable_btn(&p->btn_export_gcode_removable, "export_to_sd", _L("Export to SD card / Flash drive") + " " + GUI::shortkey_ctrl_prefix() + "U"); + init_scalable_btn(&p->btn_export_gcode_removable, "export_to_sd", _L("Export"), _L("Export to SD card / Flash drive") + " " + GUI::shortkey_ctrl_prefix() + "U"); //Y14 // regular buttons "Slice now" and "Export G-code" diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 4e14a13..d3f10f8 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -3163,14 +3163,6 @@ void TabPrinter::build_extruder_pages(size_t n_before_extruders) auto optgroup = page->new_optgroup(L("Size")); optgroup->append_single_option_line("nozzle_diameter", "", extruder_idx); -//Y11 - wxString description_line_text = _L("If you want to use other size nozzles, you need to modify the extrusion width and pressure advance."); - Line line = { "", "" }; - line.full_width = 1; - line.widget = [this, description_line_text](wxWindow* parent) { - return description_line_widget(parent, &m_nozzle_diameter_description_line, description_line_text); - }; - optgroup->append_line(line); optgroup->m_on_change = [this, extruder_idx](const t_config_option_key&opt_key, boost::any value) { @@ -3249,7 +3241,7 @@ void TabPrinter::build_extruder_pages(size_t n_before_extruders) return sizer; }; - line = optgroup->create_single_option_line("extruder_colour", "", extruder_idx); + Line line = optgroup->create_single_option_line("extruder_colour", "", extruder_idx); line.append_widget(reset_to_filament_color); optgroup->append_line(line); diff --git a/src/slic3r/GUI/Tab.hpp b/src/slic3r/GUI/Tab.hpp index 53ad7c4..40ca77a 100644 --- a/src/slic3r/GUI/Tab.hpp +++ b/src/slic3r/GUI/Tab.hpp @@ -501,8 +501,6 @@ private: bool m_rebuild_kinematics_page = false; ogStaticText* m_machine_limits_description_line {nullptr}; void update_machine_limits_description(const MachineLimitsUsage usage); -//Y11 - ogStaticText* m_nozzle_diameter_description_line {nullptr}; ogStaticText* m_fff_print_host_upload_description_line {nullptr}; ogStaticText* m_sla_print_host_upload_description_line {nullptr};