MCPcopy Create free account
hub / github.com/jerryuhoo/Fire / createLabels

Method createLabels

Source/Panels/ControlPanel/GlobalPanel.cpp:98–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98void GlobalPanel::createLabels()
99{
100 // Removed the main panel labels as they are no longer needed in the new design.
101 // The switch text ("Filter", "Lo-Fi") now serves as the title.
102
103 auto setupLabel = [this](juce::Label& label, const juce::String& text, juce::Colour colour)
104 {
105 addAndMakeVisible(label);
106 label.setText(text, juce::dontSendNotification);
107 label.setFont(juce::Font { juce::FontOptions().withName(KNOB_FONT).withHeight(KNOB_FONT_SIZE).withStyle("Plain") });
108 label.setColour(juce::Label::textColourId, colour);
109 label.setJustificationType(juce::Justification::centred);
110 };
111
112 setupLabel(filterTypeLabel, "Type", FILTER_COLOUR.withBrightness(0.8f));
113 setupLabel(lowcutSlopeLabel, "Slope", FILTER_COLOUR.withBrightness(0.8f));
114 setupLabel(highcutSlopeLabel, "Slope", FILTER_COLOUR.withBrightness(0.8f));
115
116 filterTypeLabel.attachToComponent(&filterLowCutButton, false);
117 lowcutSlopeLabel.attachToComponent(&lowcutSlopeMode, false);
118 lowcutSlopeLabel.setJustificationType(juce::Justification::centred);
119 highcutSlopeLabel.attachToComponent(&highcutSlopeMode, false);
120 highcutSlopeLabel.setJustificationType(juce::Justification::centred);
121}
122
123void GlobalPanel::createButtons()
124{

Callers

nothing calls this directly

Calls 1

setTextMethod · 0.80

Tested by

no test coverage detected