mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Use lambda callbacks instead of listeners with Slider, Button, Label, ComboBox and TextEditor classes
This commit is contained in:
parent
6d8d90e9d8
commit
e690350df3
30 changed files with 114 additions and 258 deletions
|
|
@ -335,7 +335,7 @@ ColourSelector::ColourSelector (int sectionsToShow, int edge, int gapAroundColou
|
|||
sliders[3]->setVisible ((flags & showAlphaChannel) != 0);
|
||||
|
||||
for (int i = 4; --i >= 0;)
|
||||
sliders[i]->addListener (this);
|
||||
sliders[i]->onValueChange = [this] { changeColour(); };
|
||||
}
|
||||
|
||||
if ((flags & showColourspace) != 0)
|
||||
|
|
@ -554,7 +554,7 @@ void ColourSelector::resized()
|
|||
}
|
||||
}
|
||||
|
||||
void ColourSelector::sliderValueChanged (Slider*)
|
||||
void ColourSelector::changeColour()
|
||||
{
|
||||
if (sliders[0] != nullptr)
|
||||
setCurrentColour (Colour ((uint8) sliders[0]->getValue(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue