Skip to content

Commit

Permalink
Adjust preset panelwq border thickness to spec
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseDiazRohena committed Apr 17, 2024
1 parent abb3a08 commit 183e04c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libs/tote_bag/juce_gui/components/panels/PresetPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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();
Expand Down
1 change: 1 addition & 0 deletions libs/tote_bag/juce_gui/components/panels/PresetPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class PresetPanel : public juce::Component, public juce::Timer
void updatePresetDisplay();

juce::Rectangle<int> outerBorder;
int mBorderThickness = 0;

juce::DrawableButton mInfoButton;
juce::TextButton mSavePresetButton;
Expand Down

0 comments on commit 183e04c

Please sign in to comment.