mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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:
parent
0e672fed21
commit
63cf3297f8
@ -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.
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user