mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-19 03:37:37 +08:00
Some changes for options tooltips
This commit is contained in:
parent
a934c2e79c
commit
e5e7496cea
@ -113,11 +113,19 @@ wxString Field::get_tooltip_text(const wxString& default_string)
|
|||||||
wxString tooltip_text("");
|
wxString tooltip_text("");
|
||||||
wxString tooltip = _(m_opt.tooltip);
|
wxString tooltip = _(m_opt.tooltip);
|
||||||
edit_tooltip(tooltip);
|
edit_tooltip(tooltip);
|
||||||
|
|
||||||
|
std::string opt_id = m_opt_id;
|
||||||
|
auto hash_pos = opt_id.find("#");
|
||||||
|
if (hash_pos != std::string::npos) {
|
||||||
|
opt_id.replace(hash_pos, 1,"[");
|
||||||
|
opt_id += "]";
|
||||||
|
}
|
||||||
|
|
||||||
if (tooltip.length() > 0)
|
if (tooltip.length() > 0)
|
||||||
tooltip_text = tooltip + "\n" + _(L("default value")) + "\t: " +
|
tooltip_text = tooltip + "\n" + _(L("default value")) + "\t: " +
|
||||||
(boost::iends_with(m_opt_id, "_gcode") ? "\n" : "") + default_string +
|
(boost::iends_with(opt_id, "_gcode") ? "\n" : "") + default_string +
|
||||||
(boost::iends_with(m_opt_id, "_gcode") ? "" : "\n") +
|
(boost::iends_with(opt_id, "_gcode") ? "" : "\n") +
|
||||||
_(L("parameter name")) + "\t: " + m_opt_id;
|
_(L("parameter name")) + "\t: " + opt_id;
|
||||||
|
|
||||||
return tooltip_text;
|
return tooltip_text;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user