feat(gui): add GUI components and displays
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#include "Panel.h"
|
||||
|
||||
namespace serum
|
||||
{
|
||||
|
||||
Panel::Panel (const juce::String& t) : title (t)
|
||||
{
|
||||
}
|
||||
|
||||
void Panel::paint (juce::Graphics& g)
|
||||
{
|
||||
const auto b = getLocalBounds().toFloat();
|
||||
g.setColour (theme::panel);
|
||||
g.fillRoundedRectangle (b, 8.0f);
|
||||
g.setColour (theme::outline);
|
||||
g.drawRoundedRectangle (b.reduced (0.5f), 8.0f, 1.0f);
|
||||
|
||||
if (title.isNotEmpty())
|
||||
{
|
||||
g.setColour (theme::textDim);
|
||||
g.setFont (juce::Font (11.0f, juce::Font::bold));
|
||||
g.drawText (title, 10, 6, getWidth() - 20, 16, juce::Justification::left, false);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace serum
|
||||
Reference in New Issue
Block a user