From 40003ac2b6b3368697c851e950fa166b26724640 Mon Sep 17 00:00:00 2001 From: Jose Diaz Date: Fri, 26 Apr 2024 21:15:24 +0200 Subject: [PATCH 1/3] Increase invisible spacing between slider and button --- 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 30b35696..46bc04ba 100644 --- a/src/gui/panels/ValentineTopRowPanel.cpp +++ b/src/gui/panels/ValentineTopRowPanel.cpp @@ -80,7 +80,7 @@ void TopRowPanel::resized() // We have to do this because the slider will otherwise intercept // button clips. - const auto sliderWidth = sliderInitialWidth - buttonNudge; + const auto sliderWidth = sliderInitialWidth - buttonNudge * 2.1f; const auto sliderX = sliderArea.getCentreX() - sliderWidth / 2; slider.setBounds (sliderArea.withX (sliderX).withWidth (sliderWidth)); From da0b1d7860395a57106570ebde7f5d17663206e4 Mon Sep 17 00:00:00 2001 From: Jose Diaz Date: Fri, 26 Apr 2024 21:20:41 +0200 Subject: [PATCH 2/3] Fix bug where sliders intercept top row button clicks --- src/gui/panels/ValentineTopRowPanel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/panels/ValentineTopRowPanel.cpp b/src/gui/panels/ValentineTopRowPanel.cpp index 46bc04ba..56a28dd6 100644 --- a/src/gui/panels/ValentineTopRowPanel.cpp +++ b/src/gui/panels/ValentineTopRowPanel.cpp @@ -80,7 +80,8 @@ void TopRowPanel::resized() // We have to do this because the slider will otherwise intercept // button clips. - const auto sliderWidth = sliderInitialWidth - buttonNudge * 2.1f; + const auto sliderWidth = + sliderInitialWidth - juce::roundToInt (buttonNudge * 2.1f); const auto sliderX = sliderArea.getCentreX() - sliderWidth / 2; slider.setBounds (sliderArea.withX (sliderX).withWidth (sliderWidth)); From d12af1327dd5fa91c112cfd60f8125ac61b764f9 Mon Sep 17 00:00:00 2001 From: Jose Diaz Date: Fri, 26 Apr 2024 21:22:43 +0200 Subject: [PATCH 3/3] Fix slider intercepting button click bug in bottom row --- src/gui/panels/ValentineBottomRowPanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/panels/ValentineBottomRowPanel.cpp b/src/gui/panels/ValentineBottomRowPanel.cpp index eb6a7b2f..37c2e661 100644 --- a/src/gui/panels/ValentineBottomRowPanel.cpp +++ b/src/gui/panels/ValentineBottomRowPanel.cpp @@ -101,7 +101,7 @@ void BottomRowPanel::resized() // We have to do this because the slider will otherwise intercept // button clips. - const auto outputSliderWidth = sliderWidth - buttonNudge; + const auto outputSliderWidth = sliderWidth - juce::roundToInt (buttonNudge * 2.1f); const auto outputSliderX = outputSliderArea.getCentreX() - outputSliderWidth / 2; outputSlider.setBounds (