Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

surge-fx: split ParameterPanel into its own component #7951

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

shih1
Copy link
Contributor

@shih1 shih1 commented Jan 3, 2025

Surge-fx has a generic editor layout for each fx. This means that the GraphicEQ and the Reverb have the same UI.

In preparation to create more specific UI's for each FX, this PR is a mostly a code reorg but some other changes are being shipped with

  • Remove StyleConsumer - realized that its actually not needed
  • add accessibleOrderWeakRefs to the ParameterPanel and addAndMakeVisibleRecordOrder() back. This should have been maintained for accessibility. I do think these functions & dataStruct should belong in a separate class but... is outside the scope of this PR.

The primary motivation is a simplification of Editor::resized() (in the spirit of keeping the original layout, its not exactly like this but the logic flow is as described)

void SurgefxAudioProcessorEditor::resized()
{
    auto bounds = getLocalBounds();
[...]
    auto topArea = bounds.removeFromTop(topAreaHeight);
    auto bottomArea = bounds.removeFromBottom(bottomAreaHeight);

    picker->setBounds(topArea);
    defaultKnobLayout->setBounds(bounds); 
    fxNameLabel->setBounds(bottomArea);
}

This will make it easier to switch between ParameterPanel and customLayout later.

@shih1 shih1 marked this pull request as draft January 3, 2025 22:37
@mkruselj
Copy link
Collaborator

mkruselj commented Jan 6, 2025

@shih1 Looks like we're missing files to be clang-formatted over here.

@shih1
Copy link
Contributor Author

shih1 commented Jan 10, 2025

@shih1 Looks like we're missing files to be clang-formatted over here.

i was missing a new line at the end of my new *.cpp file. my linter doesn't fix that but it should be resolved now .

hm there were also other things but it should be fixed now.

@shih1 shih1 changed the title surge-fx: split knob layout into its own component surge-fx: split ParameterPanel into its own component Jan 10, 2025
@shih1 shih1 marked this pull request as ready for review January 10, 2025 06:49
@mkruselj
Copy link
Collaborator

@baconpaul Are we good to merge this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants