#include "TextClass.h"
#include "TocBackend.h"
+#include "support/convert.h"
#include "support/debug.h"
#include "support/gettext.h"
#include "support/lstrings.h"
if (inchild && master_selected != child_selected)
symb += (child_selected ? tick : cross);
+ docstring inv_symb = from_ascii(params_.inverted ? "~" : "");
+
if (decoration() == InsetDecoration::MINIMALISTIC)
- return symb + params_.branch;
+ return symb + inv_symb + params_.branch;
docstring s;
if (inmaster && inchild)
s = _("Branch (master): ");
else // !inmaster && !inchild
s = _("Branch (undefined): ");
- s += params_.branch;
+ s += inv_symb + params_.branch;
return symb + s;
}
{
if (params_.branch.empty())
return Inset::backgroundColor(pi);
+ string const branch_id = (buffer().masterParams().branchlist().find(params_.branch))
+ ? convert<string>(buffer().masterParams().branchlist().id())
+ : convert<string>(buffer().params().branchlist().id());
// FIXME UNICODE
- ColorCode c = lcolor.getFromLyXName(to_utf8(params_.branch));
+ string const branchcol = "branch" + branch_id + to_utf8(params_.branch);
+ ColorCode c = lcolor.getFromLyXName(branchcol);
if (c == Color_none)
c = Color_error;
return c;