]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettext.C
* In the process of fixing the math background color bug, this commit transfer backgr...
[lyx.git] / src / insets / insettext.C
index 676c11e07313784cb1462e2517a90223bd91d084..a782cc56f53775d01e80dda54da0ce27fc52dc2c 100644 (file)
@@ -198,8 +198,9 @@ void InsetText::draw(PainterInfo & pi, int x, int y) const
                int const w = tm.width() + 2 * border_;
                int const a = tm.ascent() + border_;
                int const h = a + tm.descent() + border_;
-               pi.pain.rectangle(x, y - a, (wide() ? tm.maxWidth() : w), h,
-                       frameColor());
+               pi.pain.rectangle(x, y - a,
+                                 ((wide() || hasFixedWidth()) ? tm.maxWidth() : w),
+                                 h, frameColor());
        }
 }
 
@@ -211,8 +212,9 @@ void InsetText::drawSelection(PainterInfo & pi, int x, int y) const
        int const w = tm.width() + 2 * border_;
        int const a = tm.ascent() + border_;
        int const h = a + tm.descent() + border_;
-       pi.pain.fillRectangle(x, y - a, (wide() ? tm.maxWidth() : w), h,
-               backgroundColor());
+       pi.pain.fillRectangle(x, y - a,
+                             ((wide() || hasFixedWidth()) ? tm.maxWidth() : w),
+                             h, backgroundColor());
        text_.drawSelection(pi, x + border_, y);
 }