Slider::setPopupDisplayEnabled Popup position


#1

1) Is there a way to customise the slider popup bubble position?

2) Is there a way to hide the pointing arrow of the bubble?

 

Thanks!


#2

For (1) see: http://www.juce.com/forum/topic/slider-bubblecomponent

For (2) try LookAndFeel_V2::drawBubble()

Rail


#3

Big thanks for the quick response!

 

Should I do the modifications (position and bubble tip removal) inside my override of Slider::mouseDown?, I'm inheriting from Slider to make my own custom based knobs.

 

Cheers.

 


#4

No, you’d create a subclass of the LookAndFeel class and override the methods you require… Then attach that L&F class to your Slider object… Check out the JUCE demo.

Rail


#5

Sorted.

I created a new AlternateLookAndFeel class inheriting from LookAndFeel_V2 inside my PluginEditor class.

Then I override inside this new Look and Feel class:

Font getSliderPopupFont (Slider&)
int getSliderPopupPlacement (Slider&)
void drawBubble(Graphics& g, BubbleComponent& comp, const Point<float>& tip, const juce::Rectangle<float>& body)
 

to customise each thing as needed.

 

Thanks Rail!