Let InsetSpecialChar draw its background when necessary

This is the same fix as in 9940acc5 for auote inset and math macro template.
This commit is contained in:
Jean-Marc Lasgouttes 2016-08-04 23:20:18 +02:00
parent 0e672fed21
commit 63cf3297f8
2 changed files with 12 additions and 0 deletions

View File

@ -134,6 +134,16 @@ void InsetSpecialChar::metrics(MetricsInfo & mi, Dimension & dim) const
}
void InsetSpecialChar::drawBackground(PainterInfo & pi, int x, int y) const
{
if (pi.full_repaint)
return;
Dimension const dim = dimension(*pi.base.bv);
pi.pain.fillRectangle(x, y - dim.asc, dim.wid, dim.asc + dim.des,
pi.backgroundColor(this));
}
namespace {
// helper function: draw text and update x.

View File

@ -61,6 +61,8 @@ public:
///
void metrics(MetricsInfo &, Dimension &) const;
///
void drawBackground(PainterInfo & pi, int x, int y) const;
///
void draw(PainterInfo & pi, int x, int y) const;
///
void write(std::ostream &) const;