Dimension InsetCollapsable::dimensionCollapsed(BufferView const & bv) const
{
Dimension dim;
- theFontMetrics(getLayout().labelfont()).buttonText(
+ FontInfo labelfont(getLabelfont());
+ labelfont.realize(sane_font);
+ theFontMetrics(labelfont).buttonText(
buttonLabel(bv), dim.wid, dim.asc, dim.des);
return dim;
}
auto_open_[mi.base.bv] = mi.base.bv->cursor().isInside(this);
FontInfo tmpfont = mi.base.font;
- mi.base.font = getLayout().font();
+ mi.base.font = getFont();
mi.base.font.realize(tmpfont);
BufferView const & bv = *mi.base.bv;
case SubLabel: {
InsetText::metrics(mi, dim);
// consider width of the inset label
- FontInfo font(getLayout().labelfont());
+ FontInfo font(getLabelfont());
font.realize(sane_font);
font.decSize();
font.decSize();
auto_open_[&bv] = bv.cursor().isInside(this);
FontInfo tmpfont = pi.base.font;
- pi.base.font = getLayout().font();
+ pi.base.font = getFont();
pi.base.font.realize(tmpfont);
// Draw button first -- top, left or only
button_dim.y1 = y - dimc.asc;
button_dim.y2 = y + dimc.des;
- FontInfo labelfont = getLayout().labelfont();
+ FontInfo labelfont = getLabelfont();
labelfont.setColor(labelColor());
pi.pain.buttonText(x, y, buttonLabel(bv), labelfont,
mouse_hover_[&bv]);
// the label below the text. Can be toggled.
if (geometry(bv) == SubLabel) {
- FontInfo font(getLayout().labelfont());
+ FontInfo font(getLabelfont());
font.realize(sane_font);
font.decSize();
font.decSize();