Well, nearly at least. The markers are drawn inside drawWithMargin as
well. So using the last arguments of drawWithMargin will keep the
markers at the right position, but move the math cell to the right.
void InsetMathGrid::draw(PainterInfo & pi, int x, int y) const
{
- drawWithMargin(pi, x, y, 0, 0);
+ drawWithMargin(pi, x, y, 1, 1);
}
Stefan
Am 22.01.2008 um 23:04 schrieb Stefan Schimanski:
Hi!
On the right side of a math inset and the following text is a well
visible gap. I think the reason is as simple as this:
void InsetMathGrid::draw(PainterInfo & pi, int x, int y) const
{
+ // take markers into account
+ x += 1;
+ y += 1;
+
drawWithMargin(pi, x, y, 0, 0);
}
The markers enlarge the inset by one pixel in each direction. But
this pixel is not taken into account when drawing, hence the math is
not in the center.
Comments?
Schimmi
<gridmarkers.patch>