]> git.lyx.org Git - features.git/commitdiff
InsetSpace.cpp:
authorUwe Stöhr <uwestoehr@web.de>
Thu, 10 Jul 2008 22:01:57 +0000 (22:01 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Thu, 10 Jul 2008 22:01:57 +0000 (22:01 +0000)
 - use another color for negative spaces to be able to distinguish it from "normal" positive one
 - don't swap the inset drawing as this inconsistent to the other negative spaces and the ones in math mode

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25544 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetSpace.cpp

index ff4091d2427d00f3059940206709001cf50610d2..468adee65bba1ee9c56ea4c5fe686c3f4f1c107d 100644 (file)
@@ -319,19 +319,18 @@ void InsetSpace::draw(PainterInfo & pi, int x, int y) const
        xp[3] = x + w;
        yp[3] = y - max(h / 4, 1);
 
-       if (params_.length.inBP() < 0) {
-               // turn symbol upside down. A prettier solution would use
-               // inverted arrows (like in VSpace).
-               swap(yp[0], yp[1]);
-               swap(yp[2], yp[3]);
-       }
        if (params_.kind == InsetSpaceParams::PROTECTED ||
            params_.kind == InsetSpaceParams::ENSPACE ||
            params_.kind == InsetSpaceParams::NEGTHIN ||
            params_.kind == InsetSpaceParams::CUSTOM_PROTECTED)
                pi.pain.lines(xp, yp, 4, Color_latex);
-       else
-               pi.pain.lines(xp, yp, 4, Color_special);
+       else {
+               if (params_.length.inBP() < 0) {
+                       // use another color for negative spaces
+                       pi.pain.lines(xp, yp, 4, Color_red);
+               } else
+                       pi.pain.lines(xp, yp, 4, Color_special);
+       }
 }