{
params_.read(lex);
InsetCollapsable::read(buf, lex);
+ setLayout(buf.params());
setButtonLabel();
}
void InsetBranch::setButtonLabel()
{
- Font font(Font::ALL_SANE);
- font.decSize();
- font.decSize();
-
docstring s = _("Branch: ") + params_.branch;
if (!params_.branch.empty()) {
// FIXME UNICODE
s = _("Undef: ") + s;
}
}
- font.setColor(Color::foreground);
setLabel(isOpen() ? s : getNewLabel(s) );
- setLabelFont(font);
}
InsetBranchParams params;
InsetBranchMailer::string2params(to_utf8(cmd.argument()), params);
params_.branch = params.branch;
+ setLayout(cur.buffer().params());
setButtonLabel();
break;
}
const_cast<InsetCollapsable *>(this)->setDrawFrame(true);
int desc = InsetText::descent();
- if (status() == Open)
+ if (geometry() == SubLabel)
desc -= ascent();
else
desc -= 3;
pi.pain.line(x + dim_.wid - 3, y + desc, x + dim_.wid - 3, y + desc - 4,
layout_.labelfont.color());
- // the label of the charstyle. Can be toggled.
- if (status() == Open) {
+ // the label below the text. Can be toggled.
+ if (geometry() == SubLabel) {
Font font(layout_.labelfont);
font.realize(Font(Font::ALL_SANE));
font.decSize();