Bo Peng wrote:
And even if it did, it will set the background for the whole equation.
Mr Cwikel wants to have a different background for each part of the
equation.

Each part? I do not see that from the orignal post.

He sayd

In Lyx, when the cursor is moved to be within a region of the text which
is a mathematics formula, the exact extent of that rectangular region is
indicated by four purple "corner markers". For various purposes it is
highly desirable to to be able to see the exact location and extent of
the "formula region" also when the cursor is *outside* that region.

So I thought that he wanted to replace the corners will different backgrounds.


 have those little corner markers remain visible atall
times, perhaps changing to a different more intense colour when the > cursor is inside the particular region that they enclose.

This is easy. Can I apply this?

Index: src/insets/Inset.cpp
===================================================================
--- src/insets/Inset.cpp        (revision 18242)
+++ src/insets/Inset.cpp        (working copy)
@@ -287,7 +287,7 @@
void Inset::drawMarkers(PainterInfo & pi, int x, int y) const
{
       Color::color pen_color = editing(pi.base.bv)?
-               Color::mathframe : Color::background;
+               Color::mathframe : Color::mathbg;

We still need to know where the cursor is I guess so using a different color might be better.


       int const t = x + width() - 1;
       int const d = y + descent();
@@ -302,7 +302,7 @@
void Inset::drawMarkers2(PainterInfo & pi, int x, int y) const
{
       Color::color pen_color = editing(pi.base.bv)?
-               Color::mathframe : Color::background;
+               Color::mathframe : Color::mathbg;

       drawMarkers(pi, x, y);
       int const t = x + width() - 1;

Cheers,
Bo


Reply via email to