]> git.lyx.org Git - lyx.git/commitdiff
Use background to make math comments more visible
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 5 Jun 2024 08:41:47 +0000 (10:41 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 20 Jul 2024 21:37:24 +0000 (23:37 +0200)
src/mathed/InsetMathComment.cpp

index 273253ec0e7fa3c7228a3eaafb6e27963438b25a..2fdcde369e127482e70a2a8da306742a9900c452 100644 (file)
 #include "MathStream.h"
 #include "MathSupport.h"
 
+#include "frontends/Painter.h"
+
+#include "MetricsInfo.h"
+
 #include <ostream>
 
 
@@ -55,6 +59,8 @@ void InsetMathComment::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetMathComment::draw(PainterInfo & pi, int x, int y) const
 {
+       Dimension const & dim = dimension(*pi.base.bv);
+       pi.pain.fillRectangle(x, y - dim.asc, dim.wid, dim.height(), Color_notebg);
        cell(0).draw(pi, x, y);
 }