Skip to content

v0.6.0 UI6-M8: wire DirektABCompare into the header strip - #14

Open
SeamusMullan wants to merge 1 commit into
v0.6.0/ui6-m6-tooltipsfrom
v0.6.0/ui6-m8-abcompare
Open

v0.6.0 UI6-M8: wire DirektABCompare into the header strip#14
SeamusMullan wants to merge 1 commit into
v0.6.0/ui6-m6-tooltipsfrom
v0.6.0/ui6-m8-abcompare

Conversation

@SeamusMullan

Copy link
Copy Markdown
Member

Summary

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.

Dependencies

Test plan

  • cmake --build build --target BandGate_VST3 succeeds.
  • Load the plugin, click B, twist a knob, click A → previous values come back; click B → twisted values come back.
  • Click A→B while sitting on A — confirm B slot copies without leaving A.
  • Resize the editor down to the min 760 width — confirm header preset label stays usable next to the AB strip.

🤖 Generated with Claude Code

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 abCompare member to PluginEditor and 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 thread source/PluginEditor.cpp
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 thread source/PluginEditor.cpp
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);
}
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