ENH: params web link to wifi pages
Change-Id: Id79c65a973840cdc23cdf1b1c353d29da2216750
This commit is contained in:
parent
fd8caee3db
commit
30a97cc6dc
4 changed files with 60 additions and 54 deletions
|
@ -768,9 +768,9 @@ void OG_CustomCtrl::CtrlLine::render(wxDC& dc, wxCoord h_pos, wxCoord v_pos)
|
|||
break;
|
||||
}
|
||||
}
|
||||
//is_url_string = !suppress_hyperlinks && !og_line.label_path.empty();
|
||||
is_url_string = !suppress_hyperlinks && !og_line.label_path.empty();
|
||||
// BBS
|
||||
h_pos = draw_text(dc, wxPoint(h_pos, v_pos), label /* + ":" */, text_clr, ctrl->opt_group->label_width * ctrl->m_em_unit, true);
|
||||
h_pos = draw_text(dc, wxPoint(h_pos, v_pos), label /* + ":" */, text_clr, ctrl->opt_group->label_width * ctrl->m_em_unit, is_url_string, true);
|
||||
}
|
||||
|
||||
// If there's a widget, build it and set result to the correct position.
|
||||
|
@ -844,12 +844,12 @@ void OG_CustomCtrl::CtrlLine::render(wxDC& dc, wxCoord h_pos, wxCoord v_pos)
|
|||
//if (!ctrl->opt_group->option_label_at_right) // BBS
|
||||
//label += ":";
|
||||
|
||||
//if (is_url_string)
|
||||
// is_url_string = false;
|
||||
//else if(opt == option_set.front())
|
||||
// is_url_string = !suppress_hyperlinks && !og_line.label_path.empty();
|
||||
if (is_url_string)
|
||||
is_url_string = false;
|
||||
else if(opt == option_set.front())
|
||||
is_url_string = !suppress_hyperlinks && !og_line.label_path.empty();
|
||||
static wxColor c("#6B6B6B");
|
||||
h_pos = draw_text(dc, wxPoint(h_pos, v_pos), label, field ? (field->blink() ? &blink_color : &c) : nullptr, ctrl->opt_group->sublabel_width * ctrl->m_em_unit);
|
||||
h_pos = draw_text(dc, wxPoint(h_pos, v_pos), label, field ? (field->blink() ? &blink_color : &c) : nullptr, ctrl->opt_group->sublabel_width * ctrl->m_em_unit, is_url_string);
|
||||
h_pos += 8;
|
||||
}
|
||||
|
||||
|
@ -884,7 +884,7 @@ void OG_CustomCtrl::CtrlLine::render(wxDC& dc, wxCoord h_pos, wxCoord v_pos)
|
|||
}
|
||||
}
|
||||
|
||||
wxCoord OG_CustomCtrl::CtrlLine::draw_text(wxDC& dc, wxPoint pos, const wxString& text, const wxColour* color, int width, bool is_main/* = false*/)
|
||||
wxCoord OG_CustomCtrl::CtrlLine::draw_text(wxDC &dc, wxPoint pos, const wxString &text, const wxColour *color, int width, bool is_url/* = false*/, bool is_main/* = false*/)
|
||||
{
|
||||
wxString multiline_text;
|
||||
auto size = Label::split_lines(dc, width, text, multiline_text);
|
||||
|
@ -903,13 +903,16 @@ wxCoord OG_CustomCtrl::CtrlLine::draw_text(wxDC& dc, wxPoint pos, const wxStr
|
|||
|
||||
wxColour old_clr = dc.GetTextForeground();
|
||||
wxFont old_font = dc.GetFont();
|
||||
// if (is_focused && is_url)
|
||||
// // temporary workaround for the OSX because of strange Bold font behavior on BigSerf
|
||||
//#ifdef __APPLE__
|
||||
// dc.SetFont(old_font.Underlined());
|
||||
//#else
|
||||
// dc.SetFont(old_font.Bold().Underlined());
|
||||
//#endif
|
||||
static wxColor clr_url("#00AE42");
|
||||
if (is_focused && is_url) {
|
||||
// temporary workaround for the OSX because of strange Bold font behavior on BigSerf
|
||||
#ifdef __APPLE__
|
||||
dc.SetFont(old_font.Underlined());
|
||||
#else
|
||||
dc.SetFont(old_font.Bold().Underlined());
|
||||
#endif
|
||||
color = &clr_url;
|
||||
}
|
||||
dc.SetTextForeground(color ? *color :
|
||||
#ifdef _WIN32
|
||||
wxGetApp().get_label_clr_default());
|
||||
|
@ -983,7 +986,7 @@ bool OG_CustomCtrl::CtrlLine::launch_browser() const
|
|||
if (!is_focused || og_line.label_path.empty())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
return OptionsGroup::launch_browser(og_line.label_path);
|
||||
}
|
||||
|
||||
} // GUI
|
||||
|
|
|
@ -61,7 +61,7 @@ class OG_CustomCtrl :public wxPanel
|
|||
void render_separator(wxDC& dc, wxCoord v_pos);
|
||||
|
||||
void render(wxDC& dc, wxCoord h_pos, wxCoord v_pos);
|
||||
wxCoord draw_text (wxDC& dc, wxPoint pos, const wxString& text, const wxColour* color, int width, bool is_url = false);
|
||||
wxCoord draw_text (wxDC& dc, wxPoint pos, const wxString& text, const wxColour* color, int width, bool is_url = false, bool is_main = false);
|
||||
wxPoint draw_blinking_bmp(wxDC& dc, wxPoint pos, bool is_blinking);
|
||||
wxCoord draw_act_bmps(wxDC& dc, wxPoint pos, const wxBitmap& bmp_undo_to_sys, const wxBitmap& bmp_undo, bool is_blinking, size_t rect_id = 0);
|
||||
bool launch_browser() const;
|
||||
|
|
|
@ -1217,7 +1217,7 @@ void ExtruderOptionsGroup::on_change_OG(const t_config_option_key& opt_id, const
|
|||
wxString OptionsGroup::get_url(const std::string& path_end)
|
||||
{
|
||||
//BBS
|
||||
return "";
|
||||
return wxString::Format(L"https://wiki.bambulab.com/%s/software/bambu-studio/%s", L"en", from_u8(path_end));
|
||||
}
|
||||
|
||||
bool OptionsGroup::launch_browser(const std::string& path_end)
|
||||
|
|
|
@ -1748,7 +1748,7 @@ void TabPrint::build()
|
|||
auto optgroup = page->new_optgroup(L("Layer height"));
|
||||
optgroup->append_single_option_line("layer_height");
|
||||
optgroup->append_single_option_line("initial_layer_print_height");
|
||||
optgroup->append_single_option_line("adaptive_layer_height");
|
||||
optgroup->append_single_option_line("adaptive_layer_height", "adaptive-layer-height");
|
||||
|
||||
optgroup = page->new_optgroup(L("Line width"));
|
||||
optgroup->append_single_option_line("line_width");
|
||||
|
@ -1761,7 +1761,7 @@ void TabPrint::build()
|
|||
optgroup->append_single_option_line("support_line_width");
|
||||
|
||||
optgroup = page->new_optgroup(L("Seam"));
|
||||
optgroup->append_single_option_line("seam_position");
|
||||
optgroup->append_single_option_line("seam_position", "Seam");
|
||||
|
||||
optgroup = page->new_optgroup(L("Precision"));
|
||||
optgroup->append_single_option_line("resolution");
|
||||
|
@ -1818,8 +1818,9 @@ void TabPrint::build()
|
|||
optgroup->append_single_option_line("sparse_infill_speed");
|
||||
optgroup->append_single_option_line("internal_solid_infill_speed");
|
||||
optgroup->append_single_option_line("top_surface_speed");
|
||||
optgroup->append_single_option_line("enable_overhang_speed");
|
||||
optgroup->append_single_option_line("enable_overhang_speed", "slow-down-for-overhang");
|
||||
Line line = { L("Overhang speed"), L("This is the speed for various overhang degrees. Overhang degrees are expressed as a percentage of line width. 0 speed means no slowing down for the overhang degree range and wall speed is used") };
|
||||
line.label_path = "slow-down-for-overhang";
|
||||
line.append_option(optgroup->get_option("overhang_1_4_speed"));
|
||||
line.append_option(optgroup->get_option("overhang_2_4_speed"));
|
||||
line.append_option(optgroup->get_option("overhang_3_4_speed"));
|
||||
|
@ -1845,41 +1846,41 @@ void TabPrint::build()
|
|||
|
||||
page = add_options_page(L("Support"), "support");
|
||||
optgroup = page->new_optgroup(L("Support"));
|
||||
optgroup->append_single_option_line("enable_support");
|
||||
optgroup->append_single_option_line("support_type");
|
||||
optgroup->append_single_option_line("support_threshold_angle");
|
||||
optgroup->append_single_option_line("enable_support", "support");
|
||||
optgroup->append_single_option_line("support_type", "support");
|
||||
optgroup->append_single_option_line("support_threshold_angle", "support");
|
||||
optgroup->append_single_option_line("support_on_build_plate_only");
|
||||
//optgroup->append_single_option_line("enforce_support_layers");
|
||||
|
||||
optgroup = page->new_optgroup(L("Support filament"));
|
||||
optgroup->append_single_option_line("support_filament");
|
||||
optgroup->append_single_option_line("support_interface_filament");
|
||||
optgroup->append_single_option_line("support_filament", "support");
|
||||
optgroup->append_single_option_line("support_interface_filament", "support");
|
||||
|
||||
//optgroup = page->new_optgroup(L("Options for support material and raft"));
|
||||
//optgroup->append_single_option_line("support_style");
|
||||
|
||||
//BBS
|
||||
optgroup = page->new_optgroup(L("Advanced"));
|
||||
optgroup->append_single_option_line("tree_support_branch_distance");
|
||||
optgroup->append_single_option_line("tree_support_branch_diameter");
|
||||
optgroup->append_single_option_line("tree_support_branch_angle");
|
||||
optgroup->append_single_option_line("tree_support_branch_distance", "support");
|
||||
optgroup->append_single_option_line("tree_support_branch_diameter", "support");
|
||||
optgroup->append_single_option_line("tree_support_branch_angle", "support");
|
||||
optgroup->append_single_option_line("tree_support_wall_count");
|
||||
optgroup->append_single_option_line("tree_support_with_infill");
|
||||
optgroup->append_single_option_line("support_top_z_distance");
|
||||
optgroup->append_single_option_line("support_base_pattern");
|
||||
optgroup->append_single_option_line("support_base_pattern_spacing");
|
||||
optgroup->append_single_option_line("support_top_z_distance", "support");
|
||||
optgroup->append_single_option_line("support_base_pattern", "support");
|
||||
optgroup->append_single_option_line("support_base_pattern_spacing", "support");
|
||||
//optgroup->append_single_option_line("support_angle");
|
||||
optgroup->append_single_option_line("support_interface_top_layers");
|
||||
optgroup->append_single_option_line("support_interface_bottom_layers");
|
||||
optgroup->append_single_option_line("support_interface_pattern");
|
||||
optgroup->append_single_option_line("support_interface_spacing");
|
||||
optgroup->append_single_option_line("support_interface_top_layers", "support");
|
||||
optgroup->append_single_option_line("support_interface_bottom_layers", "support");
|
||||
optgroup->append_single_option_line("support_interface_pattern", "support");
|
||||
optgroup->append_single_option_line("support_interface_spacing", "support");
|
||||
optgroup->append_single_option_line("support_bottom_interface_spacing");
|
||||
//optgroup->append_single_option_line("support_interface_loop_pattern");
|
||||
|
||||
optgroup->append_single_option_line("support_object_xy_distance");
|
||||
optgroup->append_single_option_line("bridge_no_support");
|
||||
optgroup->append_single_option_line("max_bridge_length");
|
||||
optgroup->append_single_option_line("thick_bridges");
|
||||
optgroup->append_single_option_line("support_object_xy_distance", "support");
|
||||
optgroup->append_single_option_line("bridge_no_support", "support");
|
||||
optgroup->append_single_option_line("max_bridge_length", "support");
|
||||
optgroup->append_single_option_line("thick_bridges", "support");
|
||||
//optgroup->append_single_option_line("independent_support_layer_height");
|
||||
|
||||
page = add_options_page(L("Others"), "advanced");
|
||||
|
@ -1887,9 +1888,9 @@ void TabPrint::build()
|
|||
optgroup->append_single_option_line("skirt_loops");
|
||||
optgroup->append_single_option_line("skirt_distance");
|
||||
//optgroup->append_single_option_line("draft_shield");
|
||||
optgroup->append_single_option_line("brim_type");
|
||||
optgroup->append_single_option_line("brim_width");
|
||||
optgroup->append_single_option_line("brim_object_gap");
|
||||
optgroup->append_single_option_line("brim_type", "auto-brim");
|
||||
optgroup->append_single_option_line("brim_width", "auto-brim");
|
||||
optgroup->append_single_option_line("brim_object_gap", "auto-brim");
|
||||
optgroup->append_single_option_line("raft_layers");
|
||||
//optgroup->append_single_option_line("raft_first_layer_density");
|
||||
//optgroup->append_single_option_line("raft_first_layer_expansion");
|
||||
|
@ -1901,14 +1902,14 @@ void TabPrint::build()
|
|||
optgroup->append_single_option_line("prime_tower_brim_width");
|
||||
|
||||
optgroup = page->new_optgroup(L("Flush options"));
|
||||
optgroup->append_single_option_line("flush_into_infill");
|
||||
optgroup->append_single_option_line("flush_into_objects");
|
||||
optgroup->append_single_option_line("flush_into_support");
|
||||
optgroup->append_single_option_line("flush_into_infill", "reduce-wasting-during-filament-change");
|
||||
optgroup->append_single_option_line("flush_into_objects", "reduce-wasting-during-filament-change");
|
||||
optgroup->append_single_option_line("flush_into_support", "reduce-wasting-during-filament-change");
|
||||
|
||||
optgroup = page->new_optgroup(L("Special mode"));
|
||||
optgroup->append_single_option_line("print_sequence");
|
||||
optgroup->append_single_option_line("spiral_mode");
|
||||
optgroup->append_single_option_line("timelapse_no_toolhead");
|
||||
optgroup->append_single_option_line("spiral_mode", "spiral-vase");
|
||||
optgroup->append_single_option_line("timelapse_no_toolhead", "Timelapse");
|
||||
//BBS: todo remove clearance to machine
|
||||
#if 0
|
||||
//line = { L("Extruder radius"), "" };
|
||||
|
@ -2075,7 +2076,7 @@ void TabPrintModel::build()
|
|||
optgroup->append_single_option_line("layer_height");
|
||||
optgroup->append_single_option_line("sparse_infill_density");
|
||||
optgroup->append_single_option_line("wall_loops");
|
||||
optgroup->append_single_option_line("enable_support");
|
||||
optgroup->append_single_option_line("enable_support", "support");
|
||||
m_pages.pop_back();
|
||||
m_pages.insert(m_pages.begin(), page);
|
||||
|
||||
|
@ -2520,25 +2521,27 @@ void TabFilament::build()
|
|||
//};
|
||||
//optgroup->append_line(line);
|
||||
optgroup = page->new_optgroup(L("Cooling for specific layer"));
|
||||
optgroup->append_single_option_line("close_fan_the_first_x_layers");
|
||||
optgroup->append_single_option_line("close_fan_the_first_x_layers", "auto-cooling");
|
||||
//optgroup->append_single_option_line("full_fan_speed_layer");
|
||||
|
||||
optgroup = page->new_optgroup(L("Part cooling fan"));
|
||||
line = { L("Min fan speed threshold"), L("Part cooling fan speed will start to run at min speed when the estimated layer time is no longer than the layer time in setting. When layer time is shorter than threshold, fan speed is interpolated between the minimum and maximum fan speed according to layer printing time") };
|
||||
line.label_path = "auto-cooling";
|
||||
line.append_option(optgroup->get_option("fan_min_speed"));
|
||||
line.append_option(optgroup->get_option("fan_cooling_layer_time"));
|
||||
optgroup->append_line(line);
|
||||
line = { L("Max fan speed threshold"), L("Part cooling fan speed will be max when the estimated layer time is shorter than the setting value") };
|
||||
line.label_path = "auto-cooling";
|
||||
line.append_option(optgroup->get_option("fan_max_speed"));
|
||||
line.append_option(optgroup->get_option("slow_down_layer_time"));
|
||||
optgroup->append_line(line);
|
||||
optgroup->append_single_option_line("reduce_fan_stop_start_freq");
|
||||
optgroup->append_single_option_line("slow_down_for_layer_cooling");
|
||||
optgroup->append_single_option_line("slow_down_for_layer_cooling", "auto-cooling");
|
||||
optgroup->append_single_option_line("slow_down_min_speed");
|
||||
|
||||
optgroup->append_single_option_line("enable_overhang_bridge_fan");
|
||||
optgroup->append_single_option_line("overhang_fan_threshold");
|
||||
optgroup->append_single_option_line("overhang_fan_speed");
|
||||
optgroup->append_single_option_line("enable_overhang_bridge_fan", "auto-cooling");
|
||||
optgroup->append_single_option_line("overhang_fan_threshold", "auto-cooling");
|
||||
optgroup->append_single_option_line("overhang_fan_speed", "auto-cooling");
|
||||
|
||||
optgroup = page->new_optgroup(L("Auxiliary part cooling fan"));
|
||||
optgroup->append_single_option_line("additional_cooling_fan_speed");
|
||||
|
|
Loading…
Reference in a new issue