Still no way to get rid of that drop shadow on Slider's PopupDisplayComponent?

Hi,

It’s a pity that the drop shadow under a Slider’s PopupDisplayComponent still can’t be disabled using the API.

Any chance this could be changed in a near future?

you can disable it:

int MyLookAndFeel::getMenuWindowFlags()
{
   return 0;
}

I’m sorry but this has nothing to do with it.

A Slider has its own PopupDisplayComponent, which is based on BubbleComponent. BubbleComponent's constructor is self explanatory:

BubbleComponent::BubbleComponent()
  : allowablePlacements (above | below | left | right)
{
    setInterceptsMouseClicks (false, false);

    shadow.setShadowProperties (DropShadow (Colours::black.withAlpha (0.35f), 5, Point<int>()));
    setComponentEffect (&shadow);
}

It adds a shadow effect on itself and there’s nothing you can do against it without patching the library (which is not an option).

Any insight?

Ahh I see,

Apologies I’ve never used that piece of the class, the popups by default also have a drop shadow and it took a bit to figure out how to disable them.

I usually wrap my knobs up in a parent component and manage my popups / label interactions etc through that parent. That might do you the best here if you want to have a custom UX. I always found the slider a bit unwieldy with all It can do internally.

Best to treat it as a slider and nothing more imo.

I get your point. But somehow, I found it quite frustrating to have such a forced UI design decision hard coded within JUCE, where it could be easily customisable.

Well…

This would be gross but there is a hook to get the component.

Component* Slider::getCurrentPopupDisplay() const noexcept      { return pimpl->popupDisplay.get(); }

If you look at how it sets the drop shadow effect on the bubble component:

setComponentEffect (&shadow);

So you can likely get the current bubble component when it’s set visible and clear that effect.

something like:

slider-> getCurrentPopupDisplay->setComponentEffect(nullptr);

Bumping this, because I just ran into the same issue.
Would also wish, there was a way to turn off the drop shadow on the slider popup.

Giving this one a gentle bump. I still can’t find any decent reason why this arbitrary design decision is hardcoded into JUCE. Hope it can be removed someday.

Yes this has also annoyed me. Seems like it’s something that should be overrideable through LookAndFeel

1 Like

Yes it should, so it would be coherent with to the overall LookAndFeel philosophy.

1 Like