diff --git a/src/gui/panels/ValentineCenterPanel.cpp b/src/gui/panels/ValentineCenterPanel.cpp index 510f6b1a..315b4ac3 100644 --- a/src/gui/panels/ValentineCenterPanel.cpp +++ b/src/gui/panels/ValentineCenterPanel.cpp @@ -14,7 +14,11 @@ namespace valentine CenterPanel::CenterPanel (ValentineAudioProcessor& processor) : borderLineThickness (0.0f) , borderCornerSize (0.0f) + , valentineLogo ( + juce::Drawable::createFromImageData (BinaryData::logo_218x40_svg, + BinaryData::logo_218x40_svgSize)) { + addAndMakeVisible (valentineLogo.get()); } CenterPanel::~CenterPanel() @@ -47,6 +51,20 @@ void CenterPanel::resized() auto topRowBounds = localBounds.removeFromTop (juce::roundToInt (topRowHeight)); topRowBorder = topRowBounds.reduced (margin); + auto topRowComponents = topRowBorder.reduced (margin); + const auto topRowSliders = topRowComponents.removeFromLeft ( + juce::roundToInt (topRowComponents.getWidth() * .65f)); + + const auto logoHeight = juce::roundToInt (topRowComponents.getHeight() * .25f); + topRowComponents.removeFromTop (logoHeight * 1.45f); + topRowComponents.removeFromRight (logoHeight * .5f); + const auto valentineLogoBounds = topRowComponents.removeFromTop (logoHeight); + + valentineLogo->setTransformToFit ( + valentineLogoBounds.toFloat(), + juce::RectanglePlacement (juce::RectanglePlacement::centred + | juce::RectanglePlacement::fillDestination)); + const auto topRowBorderHeight = topRowBorder.getHeight(); borderLineThickness = topRowBorderHeight * .01f; borderCornerSize = topRowBorderHeight * .060f; diff --git a/src/gui/panels/ValentineCenterPanel.h b/src/gui/panels/ValentineCenterPanel.h index e2676e85..7b5481c0 100644 --- a/src/gui/panels/ValentineCenterPanel.h +++ b/src/gui/panels/ValentineCenterPanel.h @@ -26,6 +26,8 @@ class CenterPanel : public juce::Component float borderLineThickness; float borderCornerSize; + std::unique_ptr valentineLogo; + JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (CenterPanel) }; } // namespace valentine