Skip to content

Commit

Permalink
Make definition of sliderPointerY more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseDiazRohena committed Jan 6, 2024
1 parent 4eb36f5 commit c68c7ce
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libs/tote_bag/juce_gui/lookandfeel/LookAndFeel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,13 @@ void LookAndFeel::drawRotarySliderBase (juce::Graphics& g,
const auto pointerLength = radius * 0.33f;
const auto pointerThickness = radius * .066f;
const auto pointerX = -pointerThickness * 0.5f;
const auto pointerY = juce::roundToInt (juce::jmax ((rw * .05f), 1.0f)) - radius;
const auto initialPointerY = -radius;

// Increasing this value will cause the pointer to be drawn closer
// to the center of the slider.
const auto sliderEdgeOffset = juce::roundToInt (juce::jmax ((rw * .05f), 1.0f));
const auto pointerY = initialPointerY + sliderEdgeOffset;

const auto cornerSize = pointerThickness * .35f;

p.addRoundedRectangle (pointerX,
Expand Down

0 comments on commit c68c7ce

Please sign in to comment.