Skip to content

Commit

Permalink
Tweak slider pointer drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseDiazRohena committed Jan 6, 2024
1 parent 6f6bb3e commit 1281b6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/tote_bag/juce_gui/lookandfeel/LookAndFeel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ void LookAndFeel::drawRotarySliderBase (juce::Graphics& g,
g.fillEllipse (rx, ry, rw, rw);

juce::Path p;
const auto pointerLength = radius * 0.33f;
const auto pointerThickness = radius * .066f;
const auto pointerLength = radius * 0.41f;
const auto pointerThickness = radius * .085f;
const auto pointerX = -pointerThickness * 0.5f;
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 ((radius * .1f), 1.0f));
const auto sliderEdgeOffset = juce::roundToInt (juce::jmax ((radius * .12f), 1.0f));
const auto pointerY = initialPointerY + sliderEdgeOffset;

const auto cornerSize = pointerThickness * .35f;
Expand Down

0 comments on commit 1281b6d

Please sign in to comment.