Skip to content

Commit

Permalink
Minor changes to bring HOA inline with EBU PR ebu#114
Browse files Browse the repository at this point in the history
  • Loading branch information
firthm01 committed Sep 14, 2021
1 parent 70cff2d commit e5dfd82
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
#include "components/ear_combo_box.hpp"
#include "components/ear_name_text_editor.hpp"

namespace {
String routingLayoutDescriptionAt(int position, int layoutSizeFixed) {
return String(position) + String::fromUTF8("-") + String(position + layoutSizeFixed);
}
}

namespace ear {
namespace plugin {
namespace ui {
Expand Down Expand Up @@ -154,12 +160,7 @@ void HoaJuceFrontendConnector::setHoaType(int hoaType) { // 2nd here the value
routingComboBoxLocked->clearEntries();
auto cfCountFixed = cfCount != 0 ? cfCount - 1 : cfCount;
for (int i = 1; i + cfCountFixed <= 64; ++i) {
if(cfCount > 1) {
routingComboBoxLocked->addTextEntry(String(i) + String::fromUTF8("") +
String(i + cfCountFixed));
} else {
routingComboBoxLocked->addTextEntry(String(i));
}
routingComboBoxLocked->addTextEntry(routingLayoutDescriptionAt(i, cfCountFixed));
}
routingComboBoxLocked->selectEntry(cachedRouting_, sendNotification);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#include "hoa_plugin_processor.hpp"
#include "hoa_frontend_connector.hpp"

namespace{
const int desiredWidth{ 750 };
const int desiredHeight{ 930 };
}

using namespace ear::plugin::ui;

Expand Down Expand Up @@ -53,8 +57,8 @@ HoaAudioProcessorEditor::HoaAudioProcessorEditor(//this is the constructor, 2..
addAndMakeVisible(viewport_.get());

setResizable(true, false);
setResizeLimits(0, 0, 750, 930);
setSize(750, 930);
setResizeLimits(0, 0, desiredWidth, desiredHeight);
setSize(desiredWidth, desiredHeight);

//ME add
/* auto elementRelationships =
Expand All @@ -80,5 +84,5 @@ void HoaAudioProcessorEditor::paint(Graphics& g) {}

void HoaAudioProcessorEditor::resized() {
viewport_->setBounds(getLocalBounds());
content_->setBounds(0, 0, 750, 930);
content_->setBounds(0, 0, desiredWidth, desiredHeight);
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class ValueBoxMain : public Component {
}
}

hoaTypeComboBox_->setDefaultText("Enter HOA Type");
hoaTypeComboBox_->setDefaultText("Select HOA Type");
addAndMakeVisible(hoaTypeComboBox_.get());

/* commonDefinitionComboBoxPopup_->setName("HOA type box popup");
Expand Down

0 comments on commit e5dfd82

Please sign in to comment.