Skip to content

Commit

Permalink
Don't base button nudge on button width
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JoseDiazRohena committed Apr 22, 2024
1 parent a58ea2c commit c7a1117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/panels/ValentineTopRowPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c7a1117

Please sign in to comment.