MCPcopy Create free account
hub / github.com/DamRsn/NeuralNote / paint

Method paint

NeuralNote/Source/Components/Views/TranscriptionOptionsView.cpp:47–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void TranscriptionOptionsView::paint(Graphics& g)
48{
49 g.setColour(WHITE_TRANSPARENT);
50 g.fillRoundedRectangle(0.0f,
51 LEFT_SECTIONS_TOP_PAD,
52 static_cast<float>(getWidth()),
53 static_cast<float>(getHeight() - LEFT_SECTIONS_TOP_PAD),
54 5.0f);
55
56 float alpha = isEnabled() ? 1.0f : 0.5f;
57
58 g.setColour(BLACK.withAlpha(alpha));
59 g.setFont(UIDefines::TITLE_FONT());
60 g.drawText("TRANSCRIPTION", Rectangle<int>(24, 0, 250, 17), juce::Justification::centredLeft);
61
62 auto enable_rectangle = juce::Rectangle<int>(0, 0, 17, 17);
63 if (isEnabled())
64 g.fillRoundedRectangle(enable_rectangle.toFloat(), 4.0f);
65 else
66 g.drawRoundedRectangle(enable_rectangle.toFloat(), 4.0f, 1.0f);
67
68 g.setFont(UIDefines::LABEL_FONT());
69 g.drawText(
70 "PITCH BEND", juce::Rectangle<int>(19, mPitchBendDropDown->getY(), 67, 17), juce::Justification::centredLeft);
71}

Callers

nothing calls this directly

Calls 2

TITLE_FONTFunction · 0.85
LABEL_FONTFunction · 0.85

Tested by

no test coverage detected