diff --git a/ear-production-suite-plugins/plugins/direct_speakers/src/channel_gains_box.hpp b/ear-production-suite-plugins/plugins/direct_speakers/src/channel_gains_box.hpp index b86308df3..41cbcf4ca 100644 --- a/ear-production-suite-plugins/plugins/direct_speakers/src/channel_gains_box.hpp +++ b/ear-production-suite-plugins/plugins/direct_speakers/src/channel_gains_box.hpp @@ -42,8 +42,8 @@ class ChannelGainsBox : public Component { void updateChannelGainBounds() { auto area = getLocalBounds(); for (auto channelGain : channelGains_) { - channelGain->setBounds(area.removeFromLeft(50)); - area.removeFromLeft(6); + channelGain->setBounds(area.removeFromLeft(meterWidth)); + area.removeFromLeft(meterSpacing); } } @@ -63,6 +63,9 @@ class ChannelGainsBox : public Component { private: std::vector channelGains_; + static const int meterWidth{ 52 }; + static const int meterSpacing{ 5 }; + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ChannelGainsBox) }; diff --git a/ear-production-suite-plugins/plugins/direct_speakers/src/direct_speakers_frontend_connector.cpp b/ear-production-suite-plugins/plugins/direct_speakers/src/direct_speakers_frontend_connector.cpp index 47840c28e..11c6aae96 100644 --- a/ear-production-suite-plugins/plugins/direct_speakers/src/direct_speakers_frontend_connector.cpp +++ b/ear-production-suite-plugins/plugins/direct_speakers/src/direct_speakers_frontend_connector.cpp @@ -3,6 +3,16 @@ #include "components/ear_combo_box.hpp" #include "components/ear_name_text_editor.hpp" +namespace { + String routingLayoutDescriptionAt(int position, int layoutSizeFixed) { + String routingDescription = String(position); + if(layoutSizeFixed > 0) { + routingDescription += String::fromUTF8("-") + String(position + layoutSizeFixed); + } + return routingDescription; + } +} + namespace ear { namespace plugin { namespace ui { @@ -138,8 +148,7 @@ void DirectSpeakersJuceFrontendConnector::setSpeakerSetup( routingComboBoxLocked->clearEntries(); auto layoutSizeFixed = layoutSize != 0 ? layoutSize - 1 : layoutSize; for (int i = 1; i + layoutSizeFixed <= 64; ++i) { - routingComboBoxLocked->addTextEntry(String(i) + String::fromUTF8("–") + - String(i + layoutSizeFixed)); + routingComboBoxLocked->addTextEntry(routingLayoutDescriptionAt(i, layoutSizeFixed)); } routingComboBoxLocked->selectEntry(cachedRouting_, sendNotification); } diff --git a/ear-production-suite-plugins/plugins/direct_speakers/src/direct_speakers_plugin_editor.cpp b/ear-production-suite-plugins/plugins/direct_speakers/src/direct_speakers_plugin_editor.cpp index 230285d74..8a130dd15 100644 --- a/ear-production-suite-plugins/plugins/direct_speakers/src/direct_speakers_plugin_editor.cpp +++ b/ear-production-suite-plugins/plugins/direct_speakers/src/direct_speakers_plugin_editor.cpp @@ -6,6 +6,11 @@ #include "direct_speakers_plugin_processor.hpp" #include "direct_speakers_frontend_connector.hpp" +namespace{ + const int desiredWidth{ 750 }; + const int desiredHeight{ 930 }; +} + using namespace ear::plugin::ui; DirectSpeakersAudioProcessorEditor::DirectSpeakersAudioProcessorEditor( @@ -41,8 +46,8 @@ DirectSpeakersAudioProcessorEditor::DirectSpeakersAudioProcessorEditor( addAndMakeVisible(viewport_.get()); setResizable(true, false); - setResizeLimits(0, 0, 726, 930); - setSize(726, 930); + setResizeLimits(0, 0, desiredWidth, desiredHeight); + setSize(desiredWidth, desiredHeight); } DirectSpeakersAudioProcessorEditor::~DirectSpeakersAudioProcessorEditor() {} @@ -51,5 +56,5 @@ void DirectSpeakersAudioProcessorEditor::paint(Graphics& g) {} void DirectSpeakersAudioProcessorEditor::resized() { viewport_->setBounds(getLocalBounds()); - content_->setBounds(0, 0, 726, 930); + content_->setBounds(0, 0, desiredWidth, desiredHeight); } diff --git a/ear-production-suite-plugins/plugins/direct_speakers/src/value_box_main.hpp b/ear-production-suite-plugins/plugins/direct_speakers/src/value_box_main.hpp index 81ee77538..e6fe3b88b 100644 --- a/ear-production-suite-plugins/plugins/direct_speakers/src/value_box_main.hpp +++ b/ear-production-suite-plugins/plugins/direct_speakers/src/value_box_main.hpp @@ -33,7 +33,7 @@ class ValueBoxMain : public Component { routingLabel_->setJustificationType(Justification::right); addAndMakeVisible(routingLabel_.get()); - routingComboBox_->setDefaultText("enter receiving Channel"); + routingComboBox_->setDefaultText("Select Scene channel range"); addAndMakeVisible(routingComboBox_.get()); speakerSetupLabel_->setFont(EarFonts::Label); @@ -42,7 +42,7 @@ class ValueBoxMain : public Component { juce::NotificationType::dontSendNotification); speakerSetupLabel_->setJustificationType(Justification::right); addAndMakeVisible(speakerSetupLabel_.get()); - speakerSetupsComboBox_->setDefaultText("select speaker layout"); + speakerSetupsComboBox_->setDefaultText("Select speaker layout"); for (auto const& setup : SPEAKER_SETUPS) { speakerSetupsComboBox_->addTextEntry(setup.displayName + " (" + setup.name + ")" + " - " + setup.specification); diff --git a/ear-production-suite-plugins/plugins/object/src/object_plugin_editor.cpp b/ear-production-suite-plugins/plugins/object/src/object_plugin_editor.cpp index 26762ef96..9ca8e7c2b 100644 --- a/ear-production-suite-plugins/plugins/object/src/object_plugin_editor.cpp +++ b/ear-production-suite-plugins/plugins/object/src/object_plugin_editor.cpp @@ -3,6 +3,11 @@ #include "object_frontend_connector.hpp" #include "object_plugin_processor.hpp" +namespace { + const int desiredWidth{ 726 }; + const int desiredHeight{ 672 }; +} + using namespace ear::plugin::ui; ObjectAudioProcessorEditor::ObjectAudioProcessorEditor(ObjectsAudioProcessor* p) @@ -50,10 +55,9 @@ ObjectAudioProcessorEditor::ObjectAudioProcessorEditor(ObjectsAudioProcessor* p) addAndMakeVisible(viewport_.get()); setResizable(true, false); - // TODO - old size (with metadata box and divergence) setResizeLimits(0, 0, 726, 950); - setResizeLimits(0, 0, 726, 672); - // TODO - old size (with metadata box and divergence) setSize(726, 950); - setSize(726, 672); + setResizeLimits(0, 0, desiredWidth, desiredHeight); + // Note: old size (with metadata box and divergence) setSize(726, 950); + setSize(desiredWidth, desiredHeight); } ObjectAudioProcessorEditor::~ObjectAudioProcessorEditor() {} @@ -63,5 +67,5 @@ void ObjectAudioProcessorEditor::paint(Graphics& g) {} void ObjectAudioProcessorEditor::resized() { viewport_->setBounds(getLocalBounds()); // TODO - old size (with metadata box and divergence) content_->setBounds(0, 0, 726, 950); - content_->setBounds(0, 0, 726, 672); + content_->setBounds(0, 0, desiredWidth, desiredHeight); } diff --git a/ear-production-suite-plugins/plugins/object/src/value_box_main.hpp b/ear-production-suite-plugins/plugins/object/src/value_box_main.hpp index 84f63562c..dab393207 100644 --- a/ear-production-suite-plugins/plugins/object/src/value_box_main.hpp +++ b/ear-production-suite-plugins/plugins/object/src/value_box_main.hpp @@ -33,10 +33,9 @@ class ValueBoxMain : public Component { routingLabel_->setJustificationType(Justification::right); addAndMakeVisible(routingLabel_.get()); // routingComboBox_->setLookAndFeel(&routingLookAndFeel_); - routingComboBox_->setDefaultText("enter receiving Channel"); + routingComboBox_->setDefaultText("Select Scene channel"); for (int i = 1; i <= 64; ++i) { - routingComboBox_->addTextEntry(String(i) + String::fromUTF8("–") + - String(i)); + routingComboBox_->addTextEntry(String(i)); } addAndMakeVisible(routingComboBox_.get());