Skip to content

Proposal: resizing a selected track or strip resizes every selected one (#80) - #84

Open
marcin-koziol wants to merge 1 commit into
BurningTreeC:mainfrom
marcin-koziol:resize-selected-tracks
Open

marcin-koziol wants to merge 1 commit into
BurningTreeC:mainfrom
marcin-koziol:resize-selected-tracks

Conversation

@marcin-koziol

Copy link
Copy Markdown

Proposal for #80. One design choice is open below.

What

With several tracks selected, resizing one of them now resizes all of the selected tracks:

  • Arranger:
    • dragging the edge of a selected track's header sets every selected track to the new height;
    • a double-click on that edge sets them all back to the default height.
  • Mixer:
    • dragging the edge of a selected strip sets every selected strip to the new width;
    • a double-click on that edge sets them all back to the default width;
    • the width entries in a selected strip's menu (Narrow Strip and the others) also apply to every selected strip.

Resizing a track or strip that is not selected still changes only that one. Alt in the arranger and Shift in the mixer still resize every track or strip.

How

Session::resize_targets(track) returns the tracks a resize applies to:

  • every selected track, in project order, when track is one of several selected;
  • otherwise track alone.

The arranger and the mixer turn a resize into Action::Several of the existing per-track SetTrackHeight / SetStripWidth actions. These actions are layout only and not undoable, as before, so no new action was added.

Open choice: the same size or proportional?

The comment on #80 asks what should happen when the selected tracks already have different sizes. This PR gives each selected track the dragged track's new size, as Pro Tools and Reaper do. A proportional resize, where each track grows by the same factor, is the other option; it would be a small change in heights and widths if preferred.

Tests

  • dragging_a_selected_tracks_edge_sizes_every_selected_track (arranger) checks that:
    • a taller selected track takes the dragged track's new height;
    • an unselected track keeps its own height;
    • a double-click on the edge sets both selected tracks back to the default;
    • an unselected track's edge resizes only that track.
  • dragging_a_selected_strips_edge_sizes_every_selected_strip (mixer) checks that the drag and the strip menu's width apply to both selected strips, and that an unselected strip's menu changes only that strip.
  • All arranger (100) and mixer (50) tests pass. clippy -D warnings on session, arranger and mixer is clean, and so is fmt --check.

🤖 Generated with Claude Code

…gTreeC#80)

With several tracks selected, only the one whose edge was dragged
changed size. Session::resize_targets gives the tracks a resize applies
to: every selected track when the resized one is among several selected,
else it alone. The arranger's track height (dragging a header's edge, a
double-click back to the default) and the mixer's strip width (dragging
a strip's edge, a double-click, the strip menu's widths) apply to them,
each set to the same size as the dragged one. Alt (arranger) and Shift
(mixer) still size every track.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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