diff --git a/libs/tote_bag/juce_gui/components/panels/PresetPanel.cpp b/libs/tote_bag/juce_gui/components/panels/PresetPanel.cpp index 30799e12..385bbae7 100644 --- a/libs/tote_bag/juce_gui/components/panels/PresetPanel.cpp +++ b/libs/tote_bag/juce_gui/components/panels/PresetPanel.cpp @@ -64,7 +64,7 @@ void PresetPanel::paint (juce::Graphics& g) g.fillAll(); g.setColour (tote_bag::colours::plainBlack); - g.drawRect (getBounds(), detail::kBorderThickness); + g.drawRect (getBounds(), mBorderThickness); } void PresetPanel::timerCallback() @@ -81,7 +81,9 @@ void PresetPanel::resized() { const auto area = getLocalBounds(); - auto presetBounds = area.reduced (detail::kBorderThickness); + mBorderThickness = area.getHeight() * .04f; + + auto presetBounds = area.reduced (mBorderThickness); const auto presetBoundsWidth = presetBounds.getWidth(); const auto presetBoundsHeight = presetBounds.getHeight(); diff --git a/libs/tote_bag/juce_gui/components/panels/PresetPanel.h b/libs/tote_bag/juce_gui/components/panels/PresetPanel.h index 9d302572..b20d8dbb 100644 --- a/libs/tote_bag/juce_gui/components/panels/PresetPanel.h +++ b/libs/tote_bag/juce_gui/components/panels/PresetPanel.h @@ -49,6 +49,7 @@ class PresetPanel : public juce::Component, public juce::Timer void updatePresetDisplay(); juce::Rectangle outerBorder; + int mBorderThickness = 0; juce::DrawableButton mInfoButton; juce::TextButton mSavePresetButton;