2
0
Fork 0

iOS build fixes

This commit is contained in:
George Reales 2020-06-06 19:55:01 +02:00
parent 7867b6eaf9
commit 2357e0a3cf
2 changed files with 25 additions and 1 deletions

View file

@ -2195,7 +2195,13 @@ PluginGui::PluginGui (AdlibBlasterAudioProcessor* ownerFilter)
+= " Demo"
#endif
, NotificationType::dontSendNotification);
// Change LookandFeelFree combobox
oplComboBoxLookAndFeel.reset(new OPLComboBoxLookAndFeelMethods());
for (auto comB : {frequencyComboBox.get(), frequencyComboBox2.get(), velocityComboBox.get(), velocityComboBox2.get(), keyscaleAttenuationComboBox2.get(), keyscaleAttenuationComboBox.get()}){
comB->setLookAndFeel(oplComboBoxLookAndFeel.get());
}
//[/UserPreSize]
setSize (860, 580);

View file

@ -130,6 +130,24 @@ public:
private:
//[UserVariables] -- You can add your own custom variables in this section.
class OPLComboBoxLookAndFeelMethods:
public LookAndFeel_V3
{
virtual PopupMenu::Options getOptionsForComboBoxPopupMenu (ComboBox& comBox, Label& label) override{
PopupMenu::Options options = LookAndFeel_V3::getOptionsForComboBoxPopupMenu(comBox, label);
#if JUCE_IOS
if (PluginHostType::getPluginLoadedAs() == AudioProcessor::wrapperType_AudioUnitv3)
{
if (options.getTargetComponent() != nullptr)
return options.withParentComponent(options.getTargetComponent()->getTopLevelComponent());
}
#endif
return options;
};
};
std::unique_ptr<OPLComboBoxLookAndFeelMethods> oplComboBoxLookAndFeel;
static const uint32 COLOUR_MID = 0xff007f00;
static const uint32 COLOUR_RECORDING = 0xffff0000;
AdlibBlasterAudioProcessor* processor;