27 lines
594 B
C++
27 lines
594 B
C++
#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
|