Skip to content

Commit

Permalink
Use whole bounds when drawing slider
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseDiazRohena committed Dec 27, 2023
1 parent 9f8f456 commit 8eaeb87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/tote_bag/juce_gui/lookandfeel/LookAndFeel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,10 @@ void LookAndFeel::drawRotarySlider (juce::Graphics& g,
const float rotaryEndAngle,
juce::Slider& slider)
{
auto bounds = juce::Rectangle<int> (x, y, width, height).toFloat().reduced (10);
auto bounds = juce::Rectangle<int> (x, y, width, height).toFloat();
auto radius = juce::jmin (bounds.getWidth(), bounds.getHeight()) / 2.0f;
auto lineW = radius * 0.125f;
auto arcRadius = radius - lineW * 0.5f;
auto arcRadius = radius - lineW;
const auto toAngle =
rotaryStartAngle + sliderPos * (rotaryEndAngle - rotaryStartAngle);

Expand Down

0 comments on commit 8eaeb87

Please sign in to comment.