docstring const InsetBranch::buttonLabel(BufferView const & bv) const
{
+ static char_type const tick = 0x2714; // ✔ U+2714 HEAVY CHECK MARK
+ static char_type const cross = 0x2716; // ✖ U+2716 HEAVY MULTIPLICATION X
docstring s = _("Branch: ") + params_.branch;
Buffer const & realbuffer = *buffer().masterBuffer();
BranchList const & branchlist = realbuffer.params().branchlist();
}
bool const master_selected = isBranchSelected();
bool const child_selected = isBranchSelected(true);
- docstring symb = docstring(1, char_type(master_selected ? 0x2714 : 0x2716));
+ docstring symb = docstring(1, master_selected ? tick : cross);
if (inchild && master_selected != child_selected)
- symb += char_type(child_selected ? 0x2714 : 0x2716);
+ symb += child_selected ? tick : cross;
if (decoration() == InsetLayout::CLASSIC)
return symb + (isOpen(bv) ? s : getNewLabel(s));
else
}
-void InsetBranch::forOutliner(docstring & os, size_t maxlen) const
+void InsetBranch::forOutliner(docstring & os, size_t const maxlen,
+ bool const shorten) const
{
if (isBranchSelected())
- InsetCollapsable::forOutliner(os, maxlen);
+ InsetCollapsable::forOutliner(os, maxlen, shorten);
}
{
DocIterator pit = cpit;
pit.push_back(CursorSlice(const_cast<InsetBranch &>(*this)));
-
+
+ docstring tooltip;
+ text().forOutliner(tooltip, TOC_ENTRY_LENGTH);
+ docstring str = params_.branch + ": " + tooltip;
+ tooltip = support::wrapParas(tooltip, 0, 60, 2);
+
shared_ptr<Toc> toc = buffer().tocBackend().toc("branch");
- docstring str = params_.branch + ": ";
- text().forOutliner(str, TOC_ENTRY_LENGTH);
- toc->push_back(TocItem(pit, 0, str, output_active, toolTipText(docstring(), 3, 60)));
+ toc->push_back(TocItem(pit, 0, str, output_active, tooltip));
+
// Proceed with the rest of the inset.
bool const doing_output = output_active && isBranchSelected();
InsetCollapsable::addToToc(cpit, doing_output, utype);