Skip to content

Commit

Permalink
changed more font
Browse files Browse the repository at this point in the history
screaming audio issue
  • Loading branch information
hsetlik committed Apr 11, 2021
1 parent 70a32ac commit f7734e3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
15 changes: 15 additions & 0 deletions Source/CustomLnF.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,18 @@ class LnF2 : public juce::LookAndFeel_V4
setDefaultSansSerifTypefaceName("Roboto Light Italic");
}
};


class OutputButtonLnF : public juce::LookAndFeel_V4
{
public:
OutputButtonLnF()
{
setDefaultSansSerifTypefaceName("");
}

juce::Font getTextButtonFont(juce::TextButton &, int buttonHeight) override
{
return juce::Font("Bebas Neue", 15.0f, 0);
}
};
5 changes: 5 additions & 0 deletions Source/OperatorComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ panLabel(&panSlider, "")
panLabel.setVisible(false);
panLabel.setEnabled(false);

outputButton.setLookAndFeel(&outputLnF);

outputButton.triggerClick();
outputButton.triggerClick();
}
Expand All @@ -108,6 +110,8 @@ OperatorComponent::~OperatorComponent()
decayLabel.setLookAndFeel(nullptr);
sustainLabel.setLookAndFeel(nullptr);
releaseLabel.setLookAndFeel(nullptr);

outputButton.setLookAndFeel(nullptr);
}

void OperatorComponent::buttonClicked(juce::Button *b)
Expand Down Expand Up @@ -152,6 +156,7 @@ void OperatorComponent::resized()
envGraph.setBounds(n, 13 * n, 15 * n, 10 * n);

outputButton.setBounds(16 * n, 1.5 * n, 5.5 * n, 2.5 * n);
outputButton.changeWidthToFitText();
levelSlider.setBounds(19 * n, 13 * n, 4 * n, 10 * n);


Expand Down
1 change: 1 addition & 0 deletions Source/OperatorComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class OperatorComponent : public juce::Component, public juce::Button::Listener

LnF1 look1;
LnF2 look2;
OutputButtonLnF outputLnF;

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(OperatorComponent)
};
1 change: 0 additions & 1 deletion Source/SliderSubclasses.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class EnvLabel : public juce::Label, public juce::Slider::Listener
public:
EnvLabel(juce::Slider* sliderToAttach, juce::String suff) : attachSlider(sliderToAttach), suffix(suff)
{
auto vcrFont = juce::Font("WW Digital", 8.0f, 0);
auto robotoLightItalic = juce::Font("Roboto Light", 8.0f, 0).withStyle(juce::Font::FontStyleFlags::italic);
setEditable(true);
setFont(robotoLightItalic);
Expand Down

0 comments on commit f7734e3

Please sign in to comment.