From c7a1117f9d111774b0f0ecbb8d74444e0226cab0 Mon Sep 17 00:00:00 2001 From: Jose Diaz Date: Mon, 22 Apr 2024 21:34:57 +0200 Subject: [PATCH] Don't base button nudge on button width That would mess up button placement if we play with width. This change also changes button spacing. This is fine, because we're about to change it in the next commit. --- src/gui/panels/ValentineTopRowPanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/panels/ValentineTopRowPanel.cpp b/src/gui/panels/ValentineTopRowPanel.cpp index b045c1f1..64864331 100644 --- a/src/gui/panels/ValentineTopRowPanel.cpp +++ b/src/gui/panels/ValentineTopRowPanel.cpp @@ -59,7 +59,7 @@ void TopRowPanel::resized() const auto buttonWidth = juce::roundToInt (sliders.getWidth() * .033f); const auto adjustedComponentWidth = sliders.getWidth() - (buttonWidth * 2.0f); const auto sliderInitialWidth = juce::roundToInt (adjustedComponentWidth / 3.0f); - const auto buttonNudge = juce::roundToInt (buttonWidth / 5.0f); + const auto buttonNudge = juce::roundToInt (sliderInitialWidth / 12.0f); const auto setButtonAndSliderBounds = [&] (auto& button, auto& slider) { const auto initialButtonX = sliders.getX();