IIUC, this is not a signal but a call to process some mouse event so
'dispatchMouseEntered()' or 'processMouseEntered()' or even
mouseEnteredEvent() all seem more meaningful to me.

I will combine the two functions as suggested.

> +bool InsetCollapsable::notifyMouseEnter()
> +bool InsetCollapsable::notifyMouseLeave()

If there would be nothing more to it, I'd rather rename that one function:

bool InsetCollapsable::setMouseIn(bool mouse_in = true)
{
        mouse_in_ = mouse_in;
        return true;
}

How about setMouseHover? setMouseIn(false) sounds funny.

I've tried it and I like it. Some colors needs adjustment though (Yellow
'Note' text is not very visible without the grey background).

This will be changed. Thanks.

 > 1) The cursor blinking is stopped when the mouse is moved. This is done
in WorkArea::dispatch() IIRC. You might want to special case
mouse_motion and button==none so that it is now stopped.

Fixed by Abdel.

2) The cursor needs to be changed into an arrow when over a button.

This is surprisingly difficult and I have not figures out an
non-intrusive way to do this. Since Abdel knows more about cursor
shape, maybe you can help?

3) There's no way to enter a collapsed inset without the mouse. This is
not your doing but now it is more visible. IMO, we need a visual hint to
indicate that there is something to be edited inside this inset. I think
the background should also be toggled when the keyboard cursor is just
before and after the inset.

This can be left for later.

4) The toggling does not work for opened insets, only for collapsed one.

You can toggle the 'head' of the opened inset. Toggle the background
of the whole opened inset is not reasonable at all.

 - is well-tested
 - is non-intrusive
 - fixes a bug

If not, you may have to ask Jose for permission :-)

I know someone would bring this up and it is hard to convince people
this patch is harmless. This patch, in my opinion, is well-tested,
non-intrusive. As of bugs it is fixing, I was going to change mouse
shape when it moves over an clickable inset (but failed as of now), I
intended to show lyx/math instead of previewed math for hovered
mathed, since $\vspace{1in}$ etc are not visible with preview. Anyway,
if you try the patch alone, you will like the face change of buttons.

If it really causes a full screen repaint when just moving the mouse
over an i

Not really. The repaint happens only when the mouse enters and leaves
an inset *that handles setMouseHover*. The repaint is necessary since
in theory, inset size may change. Later on, if an inset can be drawn
individually,  setMouseHover can return multiple state (full redraw,
background only etc).

 it may well be intrusive on the Mac.

I will ask Bennett to test a new version of the patch. As I have said,
there are not many more repaints.

Cheers,
Bo

Reply via email to