Home to Foleys Finest Audio

Tooltip setup and ComboBox Menu color

Hi all!

Could I ask if it’s possible to change the color of the text and of the background of the tooltip? Moreover, if I have a Slider View, could I set the tooltip to show up only when the mouse is over the slider?

For the ComboBox: I have tried to change the combo-menu-background color, but the color of my combobox menu background does not change

That’s a good feature request. Currently the Tooltip cannot be customized.

Would a global colour for all Tooltips work? That is how JUCE implements it, the colour is with the TooltipWindow. To have a bespoke colour per component would be a bit trickier to implement and probably involve a bespoke Tooltip class.

I have to ask what do you mean the Tooltip only shows over the slider?
You mean it should exclude the TextBox? I am not sure if that would be the right fix. The Tooltip usually applies to the slider and the textual input. The Slider is a special case, it could be argued to have a different text for the TextBox, is that what you mean?

For the ComboBox: the reason is a problem that was only recently fixed in JUCE: the PopupMenu of the ComboBox uses the colours from the LookAndFeel. But the LookAndFeels are shared in PGM, so that wouldn’t work.
To make it work you need new LookAndFeels, it works in the shipped “FoleysFinest” LookAndFeel, at least the text colours. I just realise the background seems broken. I will have a look asap.

I should probably add the same fix to the original juce LookAndFeel_Vx as well.

1 Like

This can be a real good start! And it would be also nice to go toward single-tooltip-customization :slight_smile:

I just have a slider view, but I see the tooltip also when my mouse goes in the area of the view where there isn’t the slider. (nothing to say about the textbox)

Yesss, that’s what I did!
Thank you very much @daniel

Just a quick interim feedback: The ComboBox PopupMenu colours (background and foreground) should work now on all shipped LookAndFeels (except juce::LookAndFeel_V1, somehow I missed that, it didn’t seem to implement the drawPopupMenuItemWithOptions).

Will have a look at the Tooltip next.

1 Like

Colours for tooltips are now available on the develop branch:

You find the colours when you select the root node and open the “Node” category in the properties list.

1 Like

Thank you @daniel ! <3

Might I ask you how is possible to change the colour of the submenus of my combobox component? Because I have my ComboBox component, I override the drawPopmenu_withOptions, but those changes only the colour of my RootMenu

Can you do me a favour and stick a jassert (options.targetComponent());?
I wonder if that is passed on to the submenus, from skimming over the PopupMenu source it doesn’t seem to.

Yeah, I suppose that something strange happens in that options.targetComponent() too.

I will insert in my code that jassert, debug, and let you know.

Thank you @daniel !

Copyright © 2020-2021 Foleys Finest Audio UG. All rights reserved.