mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
Don't hardcode Color_math, such that decorations and other math
elements can be drawn in the right color on screen. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34326 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
beb3fa70e8
commit
9b3aadbe22
@ -254,13 +254,13 @@ void InsetMathFrac::draw(PainterInfo & pi, int x, int y) const
|
||||
pi.pain.line(xx + dim0.wid,
|
||||
y + dim.des - 2,
|
||||
xx + dim0.wid + 5,
|
||||
y - dim.asc + 2, Color_math);
|
||||
y - dim.asc + 2, pi.base.font.color());
|
||||
}
|
||||
if (kind_ == FRAC || kind_ == CFRAC || kind_ == CFRACLEFT
|
||||
|| kind_ == CFRACRIGHT || kind_ == DFRAC
|
||||
|| kind_ == TFRAC || kind_ == OVER)
|
||||
pi.pain.line(x + 1, y - 5,
|
||||
x + dim.wid - 2, y - 5, Color_math);
|
||||
x + dim.wid - 2, y - 5, pi.base.font.color());
|
||||
drawMarkers(pi, x, y);
|
||||
}
|
||||
|
||||
|
@ -62,12 +62,12 @@ void InsetMathRoot::draw(PainterInfo & pi, int x, int y) const
|
||||
int xp[4];
|
||||
int yp[4];
|
||||
pi.pain.line(x + dim.width(), y - a + 1,
|
||||
x + w + 4, y - a + 1, Color_math);
|
||||
x + w + 4, y - a + 1, pi.base.font.color());
|
||||
xp[0] = x + w + 4; yp[0] = y - a + 1;
|
||||
xp[1] = x + w; yp[1] = y + d;
|
||||
xp[2] = x + w - 2; yp[2] = y + (d - a)/2 + 2;
|
||||
xp[3] = x + w - 5; yp[3] = y + (d - a)/2 + 4;
|
||||
pi.pain.lines(xp, yp, 4, Color_math);
|
||||
pi.pain.lines(xp, yp, 4, pi.base.font.color());
|
||||
drawMarkers(pi, x, y);
|
||||
}
|
||||
|
||||
|
@ -51,11 +51,11 @@ void InsetMathSqrt::draw(PainterInfo & pi, int x, int y) const
|
||||
int xp[3];
|
||||
int yp[3];
|
||||
pi.pain.line(x + dim.width(), y - a + 1,
|
||||
x + 8, y - a + 1, Color_math);
|
||||
x + 8, y - a + 1, pi.base.font.color());
|
||||
xp[0] = x + 8; yp[0] = y - a + 1;
|
||||
xp[1] = x + 5; yp[1] = y + d - 1;
|
||||
xp[2] = x; yp[2] = y + (d - a)/2;
|
||||
pi.pain.lines(xp, yp, 3, Color_math);
|
||||
pi.pain.lines(xp, yp, 3, pi.base.font.color());
|
||||
drawMarkers(pi, x, y);
|
||||
}
|
||||
|
||||
|
@ -461,7 +461,7 @@ void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
|
||||
pi.pain.line(
|
||||
int(x + xx + 0.5), int(y + yy + 0.5),
|
||||
int(x + x2 + 0.5), int(y + y2 + 0.5),
|
||||
Color_math);
|
||||
pi.base.font.color());
|
||||
} else {
|
||||
int xp[32];
|
||||
int yp[32];
|
||||
@ -478,7 +478,7 @@ void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
|
||||
yp[j] = int(y + yy + 0.5);
|
||||
// lyxerr << "P[" << j ' ' << xx << ' ' << yy << ' ' << x << ' ' << y << ']';
|
||||
}
|
||||
pi.pain.lines(xp, yp, n, Color_math);
|
||||
pi.pain.lines(xp, yp, n, pi.base.font.color());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user