At the moment the
drawTooltip()) do not have any “target component” as parameters, making it impossible to customize the tooltips (size/look) according to the components scaling or lnf.
TooltipWindow’s member “
lastComponentUnderMouse” be passed to the those
that would be handy
Very good request.
As a workaround, at present time we encode some special information in the tooltip text, after a known separator.
For example, let’s say you have 3 tooltip “styles” called A, B and C.
If you want a tooltip with style “B” for a Component, the tooltip text returned by that Component can be
"some tooltip text|B"
Then you instruct your LookAndFeel to strip any trailing text that comes after a “|” and, instead of displaying it, use it as the name of the “style” you want to apply. So in this case the trailing “B” is the name of the style to use, and the tooltip text displayed is “some tooltip text”.
Thanks for the tip yfede!
My main need is scaling the tooltips and font size according to the plugin’s editor size though, and I don’t think there’s an easy workaround for that atm. I guess we just have to make our own TooltipWindow class for now.