From 9b3aadbe22be57f9473011d2c3f1842186bc03e9 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Wed, 28 Apr 2010 13:19:09 +0000 Subject: [PATCH] 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 --- src/mathed/InsetMathFrac.cpp | 4 ++-- src/mathed/InsetMathRoot.cpp | 4 ++-- src/mathed/InsetMathSqrt.cpp | 4 ++-- src/mathed/MathSupport.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/mathed/InsetMathFrac.cpp b/src/mathed/InsetMathFrac.cpp index e017b91d9a..74d3f1bb49 100644 --- a/src/mathed/InsetMathFrac.cpp +++ b/src/mathed/InsetMathFrac.cpp @@ -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); } diff --git a/src/mathed/InsetMathRoot.cpp b/src/mathed/InsetMathRoot.cpp index 050787cca8..4a78ab9975 100644 --- a/src/mathed/InsetMathRoot.cpp +++ b/src/mathed/InsetMathRoot.cpp @@ -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); } diff --git a/src/mathed/InsetMathSqrt.cpp b/src/mathed/InsetMathSqrt.cpp index feb2358041..a8ef7e386f 100644 --- a/src/mathed/InsetMathSqrt.cpp +++ b/src/mathed/InsetMathSqrt.cpp @@ -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); } diff --git a/src/mathed/MathSupport.cpp b/src/mathed/MathSupport.cpp index 309d28ed9f..d399cd9613 100644 --- a/src/mathed/MathSupport.cpp +++ b/src/mathed/MathSupport.cpp @@ -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()); } } } -- 2.39.2