Browse Source

vitalium: remove device selector (unused in plugin builds)

Signed-off-by: falkTX <falktx@falktx.com>
tags/2021-03-15
falkTX 4 years ago
parent
commit
284ee9c395
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 0 additions and 66 deletions
  1. +0
    -2
      ports/vitalium/source/common/synth_gui_interface.h
  2. +0
    -35
      ports/vitalium/source/interface/editor_sections/about_section.cpp
  3. +0
    -29
      ports/vitalium/source/interface/editor_sections/about_section.h

+ 0
- 2
ports/vitalium/source/common/synth_gui_interface.h View File

@@ -22,7 +22,6 @@
#if HEADLESS

class FullInterface { };
class AudioDeviceManager { };

#endif

@@ -45,7 +44,6 @@ class SynthGuiInterface {
SynthGuiInterface(SynthBase* synth, bool use_gui = true);
virtual ~SynthGuiInterface();

virtual AudioDeviceManager* getAudioDeviceManager() { return nullptr; }
SynthBase* getSynth() { return synth_; }
virtual void updateFullGui();
virtual void updateGuiControl(const std::string& name, vital::mono_float value);


+ 0
- 35
ports/vitalium/source/interface/editor_sections/about_section.cpp View File

@@ -106,17 +106,6 @@ void AboutSection::setLogoBounds() {
}

void AboutSection::resized() {
SynthGuiInterface* parent = findParentComponentOfClass<SynthGuiInterface>();
if (parent && device_selector_ == nullptr) {
AudioDeviceManager* device_manager = parent->getAudioDeviceManager();
if (device_manager) {
device_selector_ = std::make_unique<OpenGlDeviceSelector>(
*device_manager, 0, 0, vital::kNumChannels, vital::kNumChannels, true, false, false, false);
addAndMakeVisible(device_selector_.get());
addOpenGlComponent(device_selector_->getImageComponent());
}
}

Rectangle<int> info_rect = getInfoRect();
body_.setBounds(info_rect);
body_.setRounding(findValue(Skin::kBodyRounding));
@@ -165,28 +154,6 @@ void AboutSection::resized() {
index++;
}

if (device_selector_) {
int y = size_button_quadruple_->getBottom() + padding_y;
device_selector_->setBounds(info_rect.getX(), y,
info_rect.getWidth(), info_rect.getBottom() - y);
}

if (device_selector_) {
Colour background = findColour(Skin::kPopupBackground, true);
setColorRecursively(device_selector_.get(), ListBox::backgroundColourId, background);
setColorRecursively(device_selector_.get(), ComboBox::backgroundColourId, background);
setColorRecursively(device_selector_.get(), PopupMenu::backgroundColourId, background);
setColorRecursively(device_selector_.get(), BubbleComponent::backgroundColourId, background);

Colour text = findColour(Skin::kBodyText, true);
setColorRecursively(device_selector_.get(), ListBox::textColourId, text);
setColorRecursively(device_selector_.get(), ComboBox::textColourId, text);

setColorRecursively(device_selector_.get(), TextEditor::highlightColourId, Colours::transparentBlack);
setColorRecursively(device_selector_.get(), ListBox::outlineColourId, Colours::transparentBlack);
setColorRecursively(device_selector_.get(), ComboBox::outlineColourId, Colours::transparentBlack);
}

name_text_->setTextSize(40.0f * size_ratio_);
version_text_->setTextSize(12.0f * size_ratio_);
fork_text_->setTextSize(14.0f * size_ratio_);
@@ -230,8 +197,6 @@ void AboutSection::buttonClicked(Button* clicked_button) {
Rectangle<int> AboutSection::getInfoRect() {
int info_height = kBasicInfoHeight * size_ratio_;
int info_width = kInfoWidth * size_ratio_;
if (device_selector_)
info_height += device_selector_->getBounds().getHeight();

int x = (getWidth() - info_width) / 2;
int y = (getHeight() - info_width) / 2;


+ 0
- 29
ports/vitalium/source/interface/editor_sections/about_section.h View File

@@ -23,33 +23,6 @@

class AppLogo;

class OpenGlDeviceSelector : public OpenGlAutoImageComponent<AudioDeviceSelectorComponent> {
public:
OpenGlDeviceSelector(AudioDeviceManager& device_manager,
int min_audio_input_channels, int max_audioInput_channels,
int min_audio_output_channels, int max_audioOutput_channels,
bool show_midi_input_options, bool show_midi_output_selector,
bool show_channels_as_stereo_pairs, bool hide_advanced_options_with_button) :
OpenGlAutoImageComponent<AudioDeviceSelectorComponent>(device_manager,
min_audio_input_channels, max_audioInput_channels,
min_audio_output_channels, max_audioOutput_channels,
show_midi_input_options, show_midi_output_selector,
show_channels_as_stereo_pairs,
hide_advanced_options_with_button) {
setLookAndFeel(DefaultLookAndFeel::instance());
image_component_.setComponent(this);
}

virtual void resized() override {
OpenGlAutoImageComponent<AudioDeviceSelectorComponent>::resized();
if (isShowing())
redoImage();
}

private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(OpenGlDeviceSelector)
};

class AboutSection : public Overlay {
public:
static constexpr int kInfoWidth = 430;
@@ -87,8 +60,6 @@ class AboutSection : public Overlay {
void setGuiSize(float multiplier);
void fullScreen();

std::unique_ptr<OpenGlDeviceSelector> device_selector_;

std::unique_ptr<OpenGlToggleButton> size_button_extra_small_;
std::unique_ptr<OpenGlToggleButton> size_button_small_;
std::unique_ptr<OpenGlToggleButton> size_button_normal_;


Loading…
Cancel
Save