From 2ba8816249498d417d98ab86a798e66fc9fa36fe Mon Sep 17 00:00:00 2001 From: Jose Diaz Rohena Date: Sun, 31 Dec 2023 18:47:45 +0100 Subject: [PATCH] Further finesse center panel button and slider placements --- src/gui/panels/ValentineCenterPanel.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gui/panels/ValentineCenterPanel.cpp b/src/gui/panels/ValentineCenterPanel.cpp index 76bae915..67c10280 100644 --- a/src/gui/panels/ValentineCenterPanel.cpp +++ b/src/gui/panels/ValentineCenterPanel.cpp @@ -95,12 +95,12 @@ void CenterPanel::resized() { auto localBounds = getLocalBounds(); const auto margin = juce::roundToInt (localBounds.getHeight() * .025f); + localBounds.reduce (margin * 2.5f, margin * 2.0f); - const auto topRowHeight = localBounds.getHeight() * .55f; + const auto topRowHeight = localBounds.getHeight() * .50f; - topRowBorder = - localBounds.removeFromTop (juce::roundToInt (topRowHeight)).reduced (margin); - auto topRowComponents = topRowBorder.reduced (margin); + topRowBorder = localBounds.removeFromTop (juce::roundToInt (topRowHeight)); + auto topRowComponents = topRowBorder.reduced (margin * 1.5f); auto topRowSliders = topRowComponents.removeFromLeft ( juce::roundToInt (topRowComponents.getWidth() * .65f)); @@ -114,7 +114,7 @@ void CenterPanel::resized() juce::roundToInt ((topRowSliders.getHeight() - topRowButtonWidth) * .5f); // See below note about horizontal LabelSlider dimensions and button placement. - const auto topRowButtonNudge = topRowButtonWidth / 2.2f; + const auto topRowButtonNudge = topRowButtonWidth / 1.5f; const auto initialCrushButtonX = topRowSliders.getX(); const auto crushEnableButtonBounds = @@ -162,14 +162,14 @@ void CenterPanel::resized() borderLineThickness = topRowBorderHeight * .01f; borderCornerSize = topRowBorderHeight * .060f; - localBounds.removeFromTop (margin); - bottomRowBorder = localBounds.reduced (margin); + localBounds.removeFromTop (margin * 3); + bottomRowBorder = localBounds; const auto bottomRowBorderWidth = bottomRowBorder.getWidth(); const auto bottomRowBorderY = bottomRowBorder.getY(); const auto bottomRowBorderHeight = bottomRowBorder.getHeight(); - auto bottomRowComponents = bottomRowBorder.reduced (margin); + auto bottomRowComponents = bottomRowBorder.reduced (margin * 1.5f); const auto bottomRowButtonWidth = juce::roundToInt (bottomRowComponents.getWidth() / 60.0f);