In mouseEnter sets ‘hovered=true’ and repaints differently
In mouseExit sets ‘hovered=false’ and repaints differently
and this gives me a mouse over hover effect. works great.
BUT this component also in monseDown if mods.isPopupMenu() greatest a juce::PopupMenu and does a showMenuAsync on it
Clicking on the menu or dismissing the menu never calls the mouseExit on my component. So it stays stuck in hover. I notice Pianotec does the same.
Now of course, I can use the callback of popupmenu::showAsynch to dismiss my hover also. The way my code is structured it is mildly inconvenient but totally doable. But before I do that: is there some magic I should be doing so that PopupMenu::showAsync results in a mouseExit on my component?
Thanks so much! Surge is now 100% JUCE code and life is so much better. But we are also now finding edges like this as we go so glad to have the forum here
I submitted a patch for this which fixes it for Button. But if you are using a raw Component you can try testing isBlockedByModalCompnent() to your paint along with sMouseOver() and call repaint when you display the menu I think…
I just added an endHover to the interface I use for all my skinnable thingies, have mouseExit call endHover but then also have showMenuAsync add a [control](int i){ control->endHover();} as the second argument which fixed it. But was curious if that was dumb or necessary. Sounds like it might be a bit of both
Always appreciate the fast response I get on this forum. Thank you.