Slider small bug

If Slider::lookAndFeelChanged() is called while the slider is disabled, then the following code which is in there turns its textBox to be NOT editable :

if (valueBox->isEditable() != editableText) // (avoid overriding the single/double click flags unless we have to)
    valueBox->setEditable (editableText && owner.isEnabled());

just removing owner.isEnabled() is a quick fix that is ok I think :

if (valueBox->isEditable() != editableText)
    valueBox->setEditable (editableText);

Not sure I understand the problem.. If the slider is disabled then the box should indeed be non-editable (?)

The problem is that when the slider is then enabled back, the box stays non-editable

if you want to reproduce :

in the JuceDemo ->LookAndFeelDemo, replace the following line in LookAndFeelDemoComponent

rotarySlider.setTextBoxStyle (Slider::NoTextBox, false, 0, 0);

by this :

rotarySlider.setEnabled (false);
rotarySlider.setTextBoxStyle (Slider::TextBoxAbove, false, 100, 20);
rotarySlider.setEnabled (true);

and comment/remove the following line in LookAndFeelDemo::LookAndFeelDemo() :

lafBox.setSelectedItemIndex (3);


please let me know if the issue is still not clear ..

I thinkj I understand, but I think you were approaching it in the wrong way - try the changes I just committed, which should hopefully sort it out.

thanks for the commit/fix!

yes, it's fine, and what I was expecting