Skip to content

Commit

Permalink
Fix an off-by-one pixel error in the mod bar (#5243)
Browse files Browse the repository at this point in the history
Closes #5238
  • Loading branch information
baconpaul authored Oct 13, 2021
1 parent 744b6ec commit cb26de8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/surge-xt/gui/widgets/ModulatableSlider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,16 @@ void ModulatableSlider::paint(juce::Graphics &g)
{
juce::Graphics::ScopedSaveState gs(g);

float dLX = 0.f, dLY = 0.f;
if (orientation == ParamConfig::kVertical)
dLX = 1;
else
dLY = 1;
g.addTransform(trayPosition);
g.setColour(skin->getColor(Colors::Slider::Modulation::Positive));
g.drawLine(handleCX, handleCY, handleMX, handleMY, 2);
g.drawLine(handleCX + dLX, handleCY + dLY, handleMX + dLX, handleMY + dLY, 2);
g.setColour(skin->getColor(Colors::Slider::Modulation::Negative));
g.drawLine(handleCX, handleCY, barNMX, barNMY, 2);
g.drawLine(handleCX + dLX, handleCY + dLY, barNMX + dLX, barNMY + dLY, 2);
}
// Draw the label
if (drawLabel)
Expand Down

0 comments on commit cb26de8

Please sign in to comment.