- Painter & pain = bv->painter();
- LyXFont font(f);
-
- // label
- font.setColor(LColor::math);
-
- int const y = baseline - ascent(bv, font) + 1;
- int const w = width(bv, font) - 2;
- int const h = ascent(bv, font) + descent(bv, font) - 2;
-
- // LColor::mathbg used to be "AntiqueWhite" but is "linen" now, too
- pain.fillRectangle(int(x), y , w, h, LColor::mathmacrobg);
- pain.rectangle(int(x), y, w, h, LColor::mathframe);
-
- if (mathcursor && mathcursor->formula() == this)
- mathcursor->drawSelection(pain);
-
- pain.text(int(x + 2), baseline, prefix(), font);
- x += width(bv, font);
-
- // formula
- float t = tmacro()->width() + 5;
- x -= t;
- tmacro()->draw(pain, int(x), baseline);
- x += t;