v0.6.0 UI6-M8: wire DirektABCompare into the header strip - #14
Open
SeamusMullan wants to merge 1 commit into
Open
v0.6.0 UI6-M8: wire DirektABCompare into the header strip#14SeamusMullan wants to merge 1 commit into
SeamusMullan wants to merge 1 commit into
Conversation
Adds DirektDSP::DirektABCompare to PluginEditor. The control owns two APVTS-state snapshots and gives the user A | B | A->B buttons to compare parameter setups without leaving the editor — baseline expectation for a sound-design workflow. Sits on the right end of the header row, 132 px wide. When the editor is too narrow for both the header and the AB strip, the AB strip collapses to zero so the header stays usable. Refs v0.6.0-threshold.md UI6-M8. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
4 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR wires a new DirektDSP::DirektABCompare control into PluginEditor, placing an A/B snapshot compare strip on the right side of the header row and collapsing it when the editor width is too narrow.
Changes:
- Adds an
abComparemember toPluginEditorand constructs it with the editor’s APVTS. - Makes the A/B compare strip visible in the editor and adds a tooltip describing its behavior.
- Updates
resized()to allocate a fixed-width right-hand slice for the A/B compare strip and hide it when space is constrained.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| source/PluginEditor.h | Adds the DirektABCompare include and member to the editor. |
| source/PluginEditor.cpp | Constructs, shows, and lays out the A/B compare control in the header row. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+65
to
+70
| // UI6-M8: A/B compare snapshot toggle, sits on the right end of the header strip. | ||
| addAndMakeVisible (abCompare); | ||
| abCompare.setTooltip ("A/B compare — clicking the inactive slot saves current " | ||
| "parameters to the active slot and recalls the other; " | ||
| "the arrow copies the active snapshot to the inactive slot."); | ||
|
|
Comment on lines
+397
to
+405
| // UI6-M8: AB compare takes a fixed slice on the right; header gets the | ||
| // remainder. The header lays out its own children inside its bounds. | ||
| constexpr int abW = 132; | ||
| constexpr int abGap = 8; | ||
| if (headerRow.getWidth() > abW + abGap + 80) | ||
| { | ||
| abCompare.setBounds (headerRow.removeFromRight (abW).reduced (0, 2)); | ||
| headerRow.removeFromRight (abGap); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
DirektDSP::DirektABComparetoPluginEditor. The control owns two APVTS-state snapshots and gives the userA | B | A→Bbuttons to compare parameter setups without leaving the editor — baseline expectation for a sound-design workflow.Sits on the right end of the header row, 132 px wide. When the editor is too narrow for both the header and the AB strip, the AB strip collapses to zero so the header stays usable.
Refs
v0.6.0-threshold.mdUI6-M8.Dependencies
Test plan
cmake --build build --target BandGate_VST3succeeds.B, twist a knob, clickA→ previous values come back; clickB→ twisted values come back.A→Bwhile sitting onA— confirmBslot copies without leavingA.🤖 Generated with Claude Code