Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
FigBug committed Jan 29, 2024
1 parent 4ec9936 commit cf176d4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modules/gin_plugin/components/gin_msegcomponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,31 +125,31 @@ void MSEGComponent::paint (juce::Graphics& g)
{
for (auto i = 0; i < data.numPoints; i++)
{
auto rc = juce::Rectangle (timeToX (data.points[i].time) - 2.0f, valueToY (data.points[i].value) - 2.0f, 4.0f, 4.0f);
auto r = juce::Rectangle (timeToX (data.points[i].time) - 2.0f, valueToY (data.points[i].value) - 2.0f, 4.0f, 4.0f);

if (draggingPoint == i || getPointAt (getMouseXYRelative().toFloat()) == i)
{
g.setColour (dimIfNeeded (juce::Colours::white).withAlpha (0.3f));
g.fillEllipse (rc.expanded (4));
g.fillEllipse (r.expanded (4));
}

g.setColour (dimIfNeeded (findColour (GinLookAndFeel::accentColourId).withAlpha (0.7f)));
g.fillEllipse (rc);
g.fillEllipse (r);
}

for (auto i = 0; i < data.numPoints - 1; i++)
{
auto t = (data.points[i].time + data.points[i + 1].time) / 2.0f;
auto rc = juce::Rectangle (timeToX (t) - 2.0f, valueToY (mseg.getValueAt (t)) - 2.0f, 4.0f, 4.0f);
auto r = juce::Rectangle (timeToX (t) - 2.0f, valueToY (mseg.getValueAt (t)) - 2.0f, 4.0f, 4.0f);

if (draggingCurve == i || getCurveAt (getMouseXYRelative().toFloat()) == i)
{
g.setColour (dimIfNeeded (juce::Colours::white).withAlpha (0.3f));
g.fillEllipse (rc.expanded (4));
g.fillEllipse (r.expanded (4));
}

g.setColour (dimIfNeeded (findColour (GinLookAndFeel::accentColourId).withAlpha (0.7f)));
g.drawEllipse (rc, 1.0f);
g.drawEllipse (r, 1.0f);
}
}
}
Expand Down

0 comments on commit cf176d4

Please sign in to comment.