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
|
|
@ -431,7 +431,7 @@ void ComboBox::lookAndFeelChanged()
|
|||
setWantsKeyboardFocus (labelEditableState == labelIsNotEditable);
|
||||
}
|
||||
|
||||
label->addListener (this);
|
||||
label->onTextChange = [this] { triggerAsyncUpdate(); };
|
||||
label->addMouseListener (this, false);
|
||||
|
||||
label->setColour (Label::backgroundColourId, Colours::transparentBlack);
|
||||
|
|
@ -483,12 +483,6 @@ bool ComboBox::keyStateChanged (const bool isKeyDown)
|
|||
void ComboBox::focusGained (FocusChangeType) { repaint(); }
|
||||
void ComboBox::focusLost (FocusChangeType) { repaint(); }
|
||||
|
||||
void ComboBox::labelTextChanged (Label*)
|
||||
{
|
||||
triggerAsyncUpdate();
|
||||
}
|
||||
|
||||
|
||||
//==============================================================================
|
||||
void ComboBox::showPopupIfNotActive()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue