void InsetCaption::metrics(MetricsInfo & mi, Dimension & dim) const
{
- FontInfo tmpfont = mi.base.font;
- mi.base.font = mi.base.bv->buffer().params().getFont().fontInfo();
labelwidth_ = theFontMetrics(mi.base.font).width(full_label_);
// add some space to separate the label from the inset text
labelwidth_ += leftOffset(mi.base.bv) + rightOffset(mi.base.bv);
// Correct for button and label width
mi.base.textwidth -= dim.wid;
InsetText::metrics(mi, textdim);
- mi.base.font = tmpfont;
mi.base.textwidth += dim.wid;
dim.des = max(dim.des - textdim.asc + dim.asc, textdim.des);
dim.asc = textdim.asc;
rtl_ = !pi.ltr_pos;
FontInfo tmpfont = pi.base.font;
- pi.base.font = pi.base.bv->buffer().params().getFont().fontInfo();
pi.base.font.setColor(pi.textColor(pi.base.font.color()).baseColor);
if (is_deleted_)
pi.base.font.setStrikeout(FONT_ON);
sec += from_ascii(" ");
sec += bformat(from_ascii("(%1$s)"), labelstring);
}
- if (!sec.empty())
- full_label_ = bformat(from_ascii("%1$s %2$s: "), name, sec);
- else
- full_label_ = bformat(from_ascii("%1$s #: "), name);
+ if (sec.empty())
+ sec = from_ascii("#");
+ full_label_ = bformat(master.B_("%1$s %2$s: [[Caption label (ex. Figure 1: )]]"), name, sec);
}
// Do the real work now.