]> git.lyx.org Git - features.git/commitdiff
Don't hardcode Color_math, such that decorations and other math
authorEnrico Forestieri <forenr@lyx.org>
Wed, 28 Apr 2010 13:19:09 +0000 (13:19 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Wed, 28 Apr 2010 13:19:09 +0000 (13:19 +0000)
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
src/mathed/InsetMathRoot.cpp
src/mathed/InsetMathSqrt.cpp
src/mathed/MathSupport.cpp

index e017b91d9a66d6ff150c66bd44e8e64b8476664c..74d3f1bb498c2958674b9437020a3e98f59c92d2 100644 (file)
@@ -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);
 }
 
index 050787cca891d696fe7dde721aab2b75dc403396..4a78ab997521ba92cd2d3a719136cd9958be947b 100644 (file)
@@ -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);
 }
 
index feb2358041f5a536875b87feaf59e0b35a5ada75..a8ef7e386f1822d7fea4ea214faf136ca9f41d71 100644 (file)
@@ -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);
 }
 
index 309d28ed9f38e63b425166615200af68f1f2da86..d399cd9613506f8e9f12ab251429cdd9618a0629 100644 (file)
@@ -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());
                }
        }
 }