fix: the power headings sat one column left of their boxes
The rule between the band-driven columns and the mode-driven ones was an extra empty cell added to the body rows only. Seven cells per row against six in the header slid every heading across: Phone stood over the TX antenna, CW over Phone. The rule is now drawn on the first power cell itself, in the header and the body alike, so the two cannot drift apart again.
This commit is contained in:
@@ -1012,10 +1012,14 @@ function FlexBandPanel({ bands }: { bands: string[] }) {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// The rule marking where band-driven settings end and mode-driven ones begin
|
||||||
|
// is drawn on the FIRST power cell, header and body alike. It used to be an
|
||||||
|
// extra empty cell in the body only, which gave the two rows different column
|
||||||
|
// counts and slid every heading one column left.
|
||||||
const pwrCell = (b: string, kind: 'phone' | 'cw' | 'digi') => {
|
const pwrCell = (b: string, kind: 'phone' | 'cw' | 'digi') => {
|
||||||
const e = pwr[b.toUpperCase()] ?? { phone: 0, cw: 0, digi: 0 };
|
const e = pwr[b.toUpperCase()] ?? { phone: 0, cw: 0, digi: 0 };
|
||||||
return (
|
return (
|
||||||
<td className="px-2 py-1.5">
|
<td className={cn('px-2 py-1.5', kind === 'phone' && 'border-l border-border/60')}>
|
||||||
<Input
|
<Input
|
||||||
type="number" min={0} max={100}
|
type="number" min={0} max={100}
|
||||||
className="h-8 w-16 text-xs"
|
className="h-8 w-16 text-xs"
|
||||||
@@ -1059,9 +1063,6 @@ function FlexBandPanel({ bands }: { bands: string[] }) {
|
|||||||
<td className="px-3 py-1.5 font-mono font-semibold">{b}</td>
|
<td className="px-3 py-1.5 font-mono font-semibold">{b}</td>
|
||||||
{antCell(b, 'rx', rxList)}
|
{antCell(b, 'rx', rxList)}
|
||||||
{antCell(b, 'tx', txList)}
|
{antCell(b, 'tx', txList)}
|
||||||
{/* The rule separates what follows the BAND from what follows
|
|
||||||
the MODE — two different triggers, side by side. */}
|
|
||||||
<td className="border-l border-border/60 p-0" />
|
|
||||||
{pwrCell(b, 'phone')}
|
{pwrCell(b, 'phone')}
|
||||||
{pwrCell(b, 'cw')}
|
{pwrCell(b, 'cw')}
|
||||||
{pwrCell(b, 'digi')}
|
{pwrCell(b, 'digi')}
|
||||||
|
|||||||
Reference in New Issue
Block a user