Skip to content

Commit

Permalink
Scope transform aware for control layout (#6914)
Browse files Browse the repository at this point in the history
The layout of controls didn't position the parameters in a
height which was tranformed. Closes #6913
  • Loading branch information
baconpaul authored Apr 8, 2023
1 parent 8604817 commit 08b6338
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/surge-xt/gui/overlays/Oscilloscope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,12 @@ void Oscilloscope::resized()
spectrum_.setBounds(scopeRect);
waveform_.setBounds(scopeRect);

spectrum_parameters_.setBounds(0, h - paramsHeight, w, h);
waveform_parameters_.setBounds(0, h - paramsHeight, w, h);
juce::Rectangle<int> r;
auto ph = juce::Rectangle<int>(0, paramsHeight).transformedBy(getTransform());
auto phh = ph.getHeight();
r = juce::Rectangle<int>(0, h - phh, w, h);
spectrum_parameters_.setBounds(r.transformedBy(getTransform().inverted()));
waveform_parameters_.setBounds(r.transformedBy(getTransform().inverted()));
}

Oscilloscope::WaveformParameters::WaveformParameters(SurgeGUIEditor *e, SurgeStorage *s,
Expand Down

0 comments on commit 08b6338

Please sign in to comment.