upgrade to JUCE 5.4.3. Remove (probably) unused JUCE modules. Remove VST2 target (it's been end-of-life'd by Steinberg and by JUCE)
This commit is contained in:
@ -369,16 +369,8 @@ void ComboBox::paint (Graphics& g)
|
||||
label->getRight(), 0, getWidth() - label->getRight(), getHeight(),
|
||||
*this);
|
||||
|
||||
if (textWhenNothingSelected.isNotEmpty()
|
||||
&& label->getText().isEmpty()
|
||||
&& ! label->isBeingEdited())
|
||||
{
|
||||
g.setColour (findColour (textColourId).withMultipliedAlpha (0.5f));
|
||||
g.setFont (label->getLookAndFeel().getLabelFont (*label));
|
||||
g.drawFittedText (textWhenNothingSelected, label->getBounds().reduced (2, 1),
|
||||
label->getJustificationType(),
|
||||
jmax (1, (int) (label->getHeight() / label->getFont().getHeight())));
|
||||
}
|
||||
if (textWhenNothingSelected.isNotEmpty() && label->getText().isEmpty() && ! label->isBeingEdited())
|
||||
getLookAndFeel().drawComboBoxTextWhenNothingSelected (g, *this, *label);
|
||||
}
|
||||
|
||||
void ComboBox::resized()
|
||||
@ -523,6 +515,9 @@ static void comboBoxPopupMenuFinishedCallback (int result, ComboBox* combo)
|
||||
|
||||
void ComboBox::showPopup()
|
||||
{
|
||||
if (! menuActive)
|
||||
menuActive = true;
|
||||
|
||||
auto menu = currentMenu;
|
||||
|
||||
if (menu.getNumItems() > 0)
|
||||
@ -542,12 +537,10 @@ void ComboBox::showPopup()
|
||||
menu.addItem (1, noChoicesMessage, false, false);
|
||||
}
|
||||
|
||||
menu.setLookAndFeel (&getLookAndFeel());
|
||||
menu.showMenuAsync (PopupMenu::Options().withTargetComponent (this)
|
||||
.withItemThatMustBeVisible (getSelectedId())
|
||||
.withMinimumWidth (getWidth())
|
||||
.withMaximumNumColumns (1)
|
||||
.withStandardItemHeight (label->getHeight()),
|
||||
auto& lf = getLookAndFeel();
|
||||
|
||||
menu.setLookAndFeel (&lf);
|
||||
menu.showMenuAsync (lf.getOptionsForComboBoxPopupMenu (*this, *label),
|
||||
ModalCallbackFunction::forComponent (comboBoxPopupMenuFinishedCallback, this));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user