Vincent van Ravesteijn wrote:

Vincent van Ravesteijn wrote:
>
> Abdelrazak Younes wrote:
> >
> > We also need to fix the selection painting within Inset. In your
> > example, the inset should have a blue background, regardless off end of > > paragraph. That's also to be fixed for mathed. I mean, if you're looking
> > for something else to fix ;-)
> >
> > Abdel.
> >
>
> Tu veux tester ?
>
> Wanna give it a try ?
>
> Vincent
>

It can even (much) simpler and better... it now also works for nested
insets.

(sorry for the spam)

Vincent

And this one does the trick for math... bed time.

Vincent
Index: src/mathed/InsetMathHull.cpp
===================================================================
--- src/mathed/InsetMathHull.cpp        (revision 26450)
+++ src/mathed/InsetMathHull.cpp        (working copy)
@@ -387,9 +387,10 @@
 
        // background of mathed under focus is not painted because
        // selection at the top level of nested inset is difficult to handle.
+       ColorCode color_bg = pi.selected_ ? Color_selection : Color_mathbg;
        if (!editing(pi.base.bv))
                pi.pain.fillRectangle(x + 1, y - dim.asc + 1, dim.wid - 2,
-                               dim.asc + dim.des - 1, Color_mathbg);
+                               dim.asc + dim.des - 1, color_bg);
 
        if (use_preview_) {
                // one pixel gap in front

Reply via email to