feat(gui): add GUI components and displays

This commit is contained in:
2026-09-08 14:55:22 +02:00
parent 5a80534a2e
commit a9abca9e15
19 changed files with 898 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#include "Display.h"
namespace serum
{
void Display::paint (juce::Graphics& g)
{
const auto b = getLocalBounds().toFloat();
g.setColour (juce::Colours::black.withAlpha (0.45f));
g.fillRoundedRectangle (b, 4.0f);
g.setColour (theme::outline);
g.drawRoundedRectangle (b.reduced (0.5f), 4.0f, 1.0f);
if (title.isNotEmpty())
{
g.setColour (theme::textDim);
g.setFont (juce::Font (10.0f));
g.drawText (title, 0, 3, getWidth(), 14, juce::Justification::centred, false);
}
g.setColour (theme::accent);
g.setFont (juce::Font (14.0f, juce::Font::bold));
g.drawText (value, 0, title.isNotEmpty() ? 16 : 0, getWidth(), getHeight() - (title.isNotEmpty() ? 16 : 0),
juce::Justification::centred, false);
}
} // namespace serum