Skip to content

Commit

Permalink
Move border variable initialisations to a better place
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseDiazRohena committed Jan 3, 2024
1 parent 8c54562 commit 5963661
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/gui/panels/ValentineCenterPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ void CenterPanel::resized()
const auto topRowHeight = localBounds.getHeight() * .50f;

topRowBorder = localBounds.removeFromTop (juce::roundToInt (topRowHeight));

const auto topRowBorderHeight = topRowBorder.getHeight();
borderLineThickness = topRowBorderHeight * .01f;
borderCornerSize = topRowBorderHeight * .060f;

auto topRowComponents = topRowBorder.reduced (juce::roundToInt (margin));

auto topRowSliders = topRowComponents.removeFromLeft (
Expand Down Expand Up @@ -163,10 +168,6 @@ void CenterPanel::resized()
juce::RectanglePlacement (juce::RectanglePlacement::centred
| juce::RectanglePlacement::fillDestination));

const auto topRowBorderHeight = topRowBorder.getHeight();
borderLineThickness = topRowBorderHeight * .01f;
borderCornerSize = topRowBorderHeight * .060f;

localBounds.removeFromTop (juce::roundToInt (margin * 2));
bottomRowBorder = localBounds;

Expand Down

0 comments on commit 5963661

Please sign in to comment.