Drop the Remove button below the EQ's curve (#370)
A right-click on a band's handle removes it, and so does Delete in the EQ's tab. The button said the same a third time and took room in the row of numbers. - The row below the curve holds Type, Hz, dB, Q and Slope only. - `removePicked` stays, the right-click and Delete use it. Tests: - Typecheck, ESLint, Prettier: clean. - e2e 34 never pressed the button, nothing to change there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9ab1bbc507
commit
9166d4a56f
1 file changed
-6
@@ -30,7 +30,6 @@ import {
|
||||
} from '../../core/soundfx/parametricEq';
|
||||
import { SoundFxParametricEq } from '../../core/soundfx/nodes';
|
||||
import {
|
||||
Button,
|
||||
crispText,
|
||||
Dropdown,
|
||||
HStack,
|
||||
@@ -292,7 +291,6 @@ export class EqEditor extends VStack implements EqHost {
|
||||
readonly frequencyField: NumberField;
|
||||
readonly gainField: NumberField;
|
||||
readonly qField: NumberField;
|
||||
readonly removeButton: Button;
|
||||
private readonly perFrame: FramePreview;
|
||||
/** The texts the tab was last laid out for; a drag changes only numbers and needs no layout. */
|
||||
private laidOut = '';
|
||||
@@ -335,7 +333,6 @@ export class EqEditor extends VStack implements EqHost {
|
||||
decimals: 3,
|
||||
...numbers((q) => ({ q })),
|
||||
});
|
||||
this.removeButton = new Button('Remove', { variant: 'ghost', onClick: () => this.removePicked() });
|
||||
const row = new HStack({ gap: Theme.gap, align: 'center' });
|
||||
row.add(this.bandLabel);
|
||||
for (const [name, widget] of [
|
||||
@@ -348,8 +345,6 @@ export class EqEditor extends VStack implements EqHost {
|
||||
row.add(new Label(name, { style: 'small' }));
|
||||
row.add(widget);
|
||||
}
|
||||
row.add(new Spacer(), 1);
|
||||
row.add(this.removeButton);
|
||||
|
||||
this.body.add(this.curve, 1);
|
||||
this.body.add(row);
|
||||
@@ -504,7 +499,6 @@ export class EqEditor extends VStack implements EqHost {
|
||||
this.gainField.setEnabled(Boolean(band && hasGain(band.type)));
|
||||
this.qField.setEnabled(Boolean(band && hasQ(band.type)));
|
||||
this.slopeButton.setEnabled(Boolean(band && hasSlope(band.type)));
|
||||
this.removeButton.setEnabled(Boolean(band));
|
||||
const texts = [title, count, bandLabel].join('\n');
|
||||
if (texts !== this.laidOut) {
|
||||
this.laidOut = texts;
|
||||
|
||||
Reference in new issue
Block a user