配置下拉框优化
This commit is contained in:
parent
5716f53c37
commit
2faf0e1c86
|
@ -997,7 +997,8 @@ static std::vector<std::string> s_Preset_sla_printer_options {
|
|||
"inherits"
|
||||
};
|
||||
static std::vector<std::string> s_Preset_config_options{
|
||||
"initial_layer_line_width","outer_wall_line_width","inner_wall_line_width","top_surface_line_width","sparse_infill_line_width","support_line_width","resolution","wall_sequence"
|
||||
"initial_layer_print_height","initial_layer_line_width","outer_wall_line_width","inner_wall_line_width","top_surface_line_width","sparse_infill_line_width","support_line_width","resolution","enable_arc_fitting","wall_generator","wall_sequence",
|
||||
"detect_thin_wall"
|
||||
};
|
||||
|
||||
const std::vector<std::string>& Preset::print_options() { return s_Preset_print_options; }
|
||||
|
|
|
@ -179,6 +179,7 @@ public:
|
|||
TYPE_FILAMENT,
|
||||
TYPE_SLA_MATERIAL,
|
||||
TYPE_PRINTER,
|
||||
TYPE_CONFIG,
|
||||
TYPE_COUNT,
|
||||
// This type is here to support PresetConfigSubstitutions for physical printers, however it does not belong to the Preset class,
|
||||
// PhysicalPrinter class is used instead.
|
||||
|
@ -187,7 +188,7 @@ public:
|
|||
TYPE_PLATE,
|
||||
// BBS: model config
|
||||
TYPE_MODEL,
|
||||
TYPE_CONFIG,
|
||||
|
||||
};
|
||||
|
||||
Type type = TYPE_INVALID;
|
||||
|
|
|
@ -356,7 +356,8 @@ public:
|
|||
int version_width = memDc.GetTextExtent(m_constant_text.version).GetWidth();
|
||||
int split_width = (width + title_width - version_width) / 2;
|
||||
wxRect title_rect(wxPoint(150, 300), wxPoint(400,450));
|
||||
memDc.SetTextForeground(StateColor::darkModeColorFor(wxColour(38, 46, 48)));
|
||||
//memDc.SetTextForeground(StateColor::darkModeColorFor(wxColour(38, 46, 48)));
|
||||
memDc.SetTextForeground(StateColor::darkModeColorFor(wxColour(0, 0, 0)));
|
||||
memDc.SetFont(m_constant_text.title_font);
|
||||
//memDc.DrawLabel(m_constant_text.title, title_rect, wxALIGN_RIGHT | wxALIGN_BOTTOM);
|
||||
memDc.DrawLabel(_L("Ui title"), title_rect, wxALIGN_CENTER_VERTICAL);
|
||||
|
@ -500,6 +501,8 @@ public:
|
|||
//BitmapCache bmp_cache;
|
||||
//*bmp_cache.load_png
|
||||
wxBitmap new_bmp("E:\\Code\\Projects\\BambuStudio\\resources\\images\\back1234.png", wxBITMAP_TYPE_PNG);
|
||||
new_bmp.SetHeight(height);
|
||||
new_bmp.SetWidth(width);
|
||||
return new_bmp;
|
||||
}
|
||||
|
||||
|
|
|
@ -742,8 +742,7 @@ PlaterPresetComboBox::PlaterPresetComboBox(wxWindow *parent, Preset::Type preset
|
|||
|| m_type == Preset::TYPE_FILAMENT
|
||||
#endif //__linux__
|
||||
)
|
||||
//show_edit_menu();
|
||||
std::cout<<"123"<<endl;
|
||||
show_edit_menu();
|
||||
else
|
||||
switch_to_tab();
|
||||
});
|
||||
|
|
|
@ -1936,11 +1936,11 @@ void TabPrint::build()
|
|||
//optgroup->append_single_option_line("line_width","parameter/line-width");
|
||||
//optgroup->append_single_option_line("initial_layer_line_width","parameter/line-width");
|
||||
//optgroup->append_single_option_line("outer_wall_line_width","parameter/line-width");
|
||||
optgroup->append_single_option_line("inner_wall_line_width","parameter/line-width");
|
||||
optgroup->append_single_option_line("top_surface_line_width","parameter/line-width");
|
||||
optgroup->append_single_option_line("sparse_infill_line_width","parameter/line-width");
|
||||
//optgroup->append_single_option_line("inner_wall_line_width","parameter/line-width");
|
||||
//optgroup->append_single_option_line("top_surface_line_width","parameter/line-width");
|
||||
//optgroup->append_single_option_line("sparse_infill_line_width","parameter/line-width");
|
||||
//optgroup->append_single_option_line("internal_solid_infill_line_width","parameter/line-width");
|
||||
optgroup->append_single_option_line("support_line_width","parameter/line-width");
|
||||
//optgroup->append_single_option_line("support_line_width","parameter/line-width");
|
||||
//xiamian-
|
||||
//optgroup = page->new_optgroup(L("Seam"), L"param_seam");
|
||||
//optgroup->append_single_option_line("seam_position", "Seam");
|
||||
|
@ -1957,8 +1957,8 @@ void TabPrint::build()
|
|||
//xiamian-
|
||||
//optgroup = page->new_optgroup(L("Precision"), L"param_precision");
|
||||
//optgroup->append_single_option_line("slice_closing_radius");
|
||||
optgroup->append_single_option_line("resolution","acr-move");
|
||||
optgroup->append_single_option_line("enable_arc_fitting", "acr-move");
|
||||
//optgroup->append_single_option_line("resolution","acr-move");
|
||||
//optgroup->append_single_option_line("enable_arc_fitting", "acr-move");
|
||||
//optgroup->append_single_option_line("xy_hole_compensation", "xy-hole-contour-compensation");
|
||||
//optgroup->append_single_option_line("xy_contour_compensation", "xy-hole-contour-compensation");
|
||||
//optgroup->append_single_option_line("elefant_foot_compensation", "parameter/elephant-foot");
|
||||
|
@ -4285,19 +4285,43 @@ void TabConfig::build() {
|
|||
m_presets = &m_preset_bundle->configs;
|
||||
load_initial_data();
|
||||
|
||||
auto page = add_options_page(L("Quality"), "config");
|
||||
auto optgroup = page->new_optgroup("", L"param_layer_height");
|
||||
//auto page = add_options_page(L("Qualityttttttt"), "empty");
|
||||
//auto optgroup = page->new_optgroup("", L"param_layer_height");
|
||||
//optgroup->append_single_option_line("initial_layer_print_height", "layer-height");
|
||||
optgroup->append_single_option_line("initial_layer_line_width");
|
||||
optgroup->append_single_option_line("outer_wall_line_width", "parameter/line-width");
|
||||
optgroup->append_single_option_line("inner_wall_line_width", "parameter/line-width");
|
||||
optgroup->append_single_option_line("top_surface_line_width", "parameter/line-width");
|
||||
optgroup->append_single_option_line("sparse_infill_line_width", "parameter/line-width");
|
||||
optgroup->append_single_option_line("support_line_width", "parameter/line-width");
|
||||
optgroup->append_single_option_line("resolution", "acr-move");
|
||||
optgroup->append_single_option_line("enable_arc_fitting", "acr-move");
|
||||
//optgroup->append_single_option_line("initial_layer_line_width");
|
||||
//optgroup->append_single_option_line("outer_wall_line_width", "parameter/line-width");
|
||||
//optgroup->append_single_option_line("inner_wall_line_width", "parameter/line-width");
|
||||
//optgroup->append_single_option_line("top_surface_line_width", "parameter/line-width");
|
||||
//optgroup->append_single_option_line("sparse_infill_line_width", "parameter/line-width");
|
||||
//optgroup->append_single_option_line("support_line_width", "parameter/line-width");
|
||||
//optgroup->append_single_option_line("resolution", "acr-move");
|
||||
//optgroup->append_single_option_line("enable_arc_fitting", "acr-move");
|
||||
//optgroup->append_single_option_line("wall_generator", "wall-generator");
|
||||
//optgroup->append_single_option_line("wall_sequence");
|
||||
|
||||
/*page = add_options_page(L("Strength"), "empty");
|
||||
optgroup = page->new_optgroup("", L"param_wall");
|
||||
optgroup->append_single_option_line("detect_thin_wall", "wall-generator");*/
|
||||
|
||||
auto page = add_options_page(L("Filament"), "spool");
|
||||
//BBS
|
||||
auto optgroup = page->new_optgroup(L("Basic information"), L"param_information");
|
||||
// Set size as all another fields for a better alignment
|
||||
//Option option = optgroup->get_option("filament_type");
|
||||
|
||||
page = add_options_page(L("Cooling"), "empty");
|
||||
|
||||
//line = { "", "" };
|
||||
//line.full_width = 1;
|
||||
//line.widget = [this](wxWindow* parent) {
|
||||
// return description_line_widget(parent, &m_cooling_description_line);
|
||||
//};
|
||||
//optgroup->append_line(line);
|
||||
optgroup = page->new_optgroup(L("Cooling for specific layer"), L"param_cooling");
|
||||
|
||||
page = add_options_page(L("Advanced"), "advanced");
|
||||
optgroup = page->new_optgroup(L("Filament start G-code"), L"param_gcode", 0);
|
||||
|
||||
optgroup->append_single_option_line("wall_sequence");
|
||||
}
|
||||
void TabConfig::reload_config()
|
||||
{
|
||||
|
@ -4319,8 +4343,46 @@ void TabConfig::update_description_lines()
|
|||
// this->update_volumetric_flow_preset_hints();
|
||||
}
|
||||
void TabConfig::toggle_options() {
|
||||
if (!m_active_page)
|
||||
return;
|
||||
|
||||
bool is_BBL_printer = false;
|
||||
if (m_preset_bundle) {
|
||||
is_BBL_printer =
|
||||
m_preset_bundle->configs.get_edited_preset().is_bbl_vendor_preset(
|
||||
m_preset_bundle);
|
||||
}
|
||||
if (m_active_page->title() == "Quality") {
|
||||
//toggle_line("printable_area", !is_configed_by_BBL);//all printer can entry and view data
|
||||
//toggle_option("single_extruder_multi_material", have_multiple_extruders);
|
||||
//BBS: gcode_flavore of BBL printer can't be edited and changed
|
||||
toggle_option("gcode_flavor", !is_BBL_printer);
|
||||
//toggle_option("thumbnail_size", !is_BBL_printer);
|
||||
//toggle_option("printer_structure", !is_BBL_printer);
|
||||
//toggle_option("use_relative_e_distances", !is_BBL_printer);
|
||||
//toggle_option("support_chamber_temp_control", !is_BBL_printer);
|
||||
//toggle_option("use_firmware_retraction", !is_BBL_printer);
|
||||
//toggle_option("support_air_filtration", is_BBL_printer);
|
||||
//auto flavor = m_config->option<ConfigOptionEnum<GCodeFlavor>>("gcode_flavor")->value;
|
||||
//bool is_marlin_flavor = flavor == gcfMarlinLegacy || flavor == gcfMarlinFirmware;
|
||||
//// Disable silent mode for non-marlin firmwares.
|
||||
//toggle_option("silent_mode", is_marlin_flavor);
|
||||
////BBS: extruder clearance of BBL printer can't be edited.
|
||||
//for (auto el : { "extruder_clearance_max_radius", "extruder_clearance_height_to_rod", "extruder_clearance_height_to_lid" })
|
||||
// toggle_option(el, !is_BBL_printer);
|
||||
}
|
||||
|
||||
if (m_active_page->title() == "Strength") {
|
||||
//toggle_line("time_lapse_gcode", m_preset_bundle->configs.get_edited_preset().config.opt_enum<PrinterStructure>("printer_structure") == PrinterStructure::psI3);
|
||||
toggle_option("thumbnail_size", !is_BBL_printer);
|
||||
}
|
||||
}
|
||||
void TabConfig::update() {
|
||||
|
||||
update_description_lines();
|
||||
//BBS: GUI refactor
|
||||
//Layout();
|
||||
m_parent->Layout();
|
||||
}
|
||||
void TabConfig::clear_pages() {
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue